diff --git a/build.sh b/build.sh index c83ef21..6d2a72a 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/build_after.sh b/build_after.sh deleted file mode 100644 index b38cbfe..0000000 --- a/build_after.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -echo -echo "==> after compilation" -# 编译目录 -echo "BuildDir: $BuildDir" -# 发布包目录 -echo "ReleaseDir: $ReleaseDir" -# 发布包文件名称 -echo "ReleaseFileName: $ReleaseFileName" - -# =================== diff --git a/build_before.sh b/build_before.sh deleted file mode 100644 index 2e47540..0000000 --- a/build_before.sh +++ /dev/null @@ -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