diff --git a/build.sh b/build.sh index 923056c..c83ef21 100755 --- a/build.sh +++ b/build.sh @@ -156,17 +156,21 @@ cp -rf ${BuildPackagelDir}/${PACKAGE_MANAGER}/* ${BuildDir} if [[ $PACKAGE_MANAGER = "deb" ]]; then cp -rf ${BuildLinuxDir}/* ${BuildDir} cd ${BuildDir} - # 应用处理 - app + # 打包前处理 + . ./build_before.sh # 打包 deb + # 打包后处理 + . ./build_after.sh elif [[ $PACKAGE_MANAGER = "rpm" ]]; then cp -rf ${BuildLinuxDir}/* ${BuildDir}/BUILD cd ${BuildDir}/BUILD - # 应用处理 - app + # 打包前处理 + . $RootDir/build_before.sh # 打包 rpm + # 打包后处理 + . $RootDir/build_after.sh else echo "unknown runing: $PACKAGE_MANAGER" exit 1 diff --git a/build_before.sh b/build_before.sh index efe76f1..2e47540 100644 --- a/build_before.sh +++ b/build_before.sh @@ -13,7 +13,8 @@ echo "ReleaseFileName: $ReleaseFileName" # 数据库脚本 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 diff --git a/linux/usr/local/etc/omc/database/.gitkeep b/linux/usr/local/etc/omc/database/lite/common/.gitkeep similarity index 100% rename from linux/usr/local/etc/omc/database/.gitkeep rename to linux/usr/local/etc/omc/database/lite/common/.gitkeep diff --git a/linux/usr/local/etc/omc/database/lite/install/.gitkeep b/linux/usr/local/etc/omc/database/lite/install/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/linux/usr/local/etc/omc/database/lite/upgrade/.gitkeep b/linux/usr/local/etc/omc/database/lite/upgrade/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/linux/usr/local/etc/omc/database/standard/common/.gitkeep b/linux/usr/local/etc/omc/database/standard/common/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/linux/usr/local/etc/omc/database/standard/install/.gitkeep b/linux/usr/local/etc/omc/database/standard/install/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/linux/usr/local/etc/omc/database/standard/upgrade/.gitkeep b/linux/usr/local/etc/omc/database/standard/upgrade/.gitkeep new file mode 100644 index 0000000..e69de29