1
0

ref: 构建工具重构

This commit is contained in:
TsMask
2025-03-19 20:08:16 +08:00
parent 3a9b4375f4
commit 691bb89829
3 changed files with 8 additions and 42 deletions

View File

@@ -100,9 +100,10 @@ app() {
# 数据库脚本 common属于重建脚本
modeList="standard lite"
for v in ${modeList}; do
cp -rf $BuildDir/usr/local/etc/omc/database/${v}/common/* $BuildDir/usr/local/etc/omc/database/${v}/install/
cp -rf $BuildDir/usr/local/etc/omc/database/${v}/common/* $BuildDir/usr/local/etc/omc/database/${v}/upgrade/
rm -rf $BuildDir/usr/local/etc/omc/database/${v}/common
path=$BuildDir/usr/local/etc/omc/database/${v}
cp -rf $path/common/* $path/install/
cp -rf $path/common/* $path/upgrade/
rm -rf $path/common
done
}
@@ -156,21 +157,17 @@ cp -rf ${BuildPackagelDir}/${PACKAGE_MANAGER}/* ${BuildDir}
if [[ $PACKAGE_MANAGER = "deb" ]]; then
cp -rf ${BuildLinuxDir}/* ${BuildDir}
cd ${BuildDir}
# 打包前处理
. ./build_before.sh
# 应用文件处理
app
# 打包
deb
# 打包后处理
. ./build_after.sh
elif [[ $PACKAGE_MANAGER = "rpm" ]]; then
cp -rf ${BuildLinuxDir}/* ${BuildDir}/BUILD
cd ${BuildDir}/BUILD
# 打包前处理
. $RootDir/build_before.sh
# 应用文件处理
app
# 打包
rpm
# 打包后处理
. $RootDir/build_after.sh
else
echo "unknown runing: $PACKAGE_MANAGER"
exit 1

View File

@@ -1,11 +0,0 @@
#!/bin/bash
echo
echo "==> after compilation"
# 编译目录
echo "BuildDir: $BuildDir"
# 发布包目录
echo "ReleaseDir: $ReleaseDir"
# 发布包文件名称
echo "ReleaseFileName: $ReleaseFileName"
# ===================

View File

@@ -1,20 +0,0 @@
#!/bin/bash
echo
echo "==> before compilation"
# 编译目录
echo "BuildDir: $BuildDir"
# 发布包目录
echo "ReleaseDir: $ReleaseDir"
# 发布包文件名称
echo "ReleaseFileName: $ReleaseFileName"
# ===================
# 数据库脚本 common属于重建脚本
modeList="standard lite"
for v in ${modeList}; do
path=$BuildDir/usr/local/etc/omc/database/${v}
cp -rf $path/common/* $path/install/
cp -rf $path/common/* $path/upgrade/
rm -rf $path/common
done