diff --git a/build.sh b/build.sh index c870290..6f77bc4 100755 --- a/build.sh +++ b/build.sh @@ -98,7 +98,7 @@ ReleaseFileName=omc-r${VERSION}-${Date}-${OS_NAME}-${PACKAGE_ARCH}.${PACKAGE_MAN # 应用文件处理 ./位于临时目录 app() { # 数据库脚本 common属于重建脚本 - modeList="standard lite" + modeList="std lite" for v in ${modeList}; do path=./usr/local/etc/omc/database/${v} cp -rf $path/common/* $path/install/ diff --git a/linux/usr/local/etc/omc/database/standard/common/z.sql b/linux/usr/local/etc/omc/database/std/common/z.sql similarity index 100% rename from linux/usr/local/etc/omc/database/standard/common/z.sql rename to linux/usr/local/etc/omc/database/std/common/z.sql diff --git a/linux/usr/local/etc/omc/database/standard/install/.gitkeep b/linux/usr/local/etc/omc/database/std/install/.gitkeep similarity index 100% rename from linux/usr/local/etc/omc/database/standard/install/.gitkeep rename to linux/usr/local/etc/omc/database/std/install/.gitkeep diff --git a/linux/usr/local/etc/omc/database/standard/upgrade/.gitkeep b/linux/usr/local/etc/omc/database/std/upgrade/.gitkeep similarity index 100% rename from linux/usr/local/etc/omc/database/standard/upgrade/.gitkeep rename to linux/usr/local/etc/omc/database/std/upgrade/.gitkeep diff --git a/linux/usr/local/etc/omc/script/setup.sh b/linux/usr/local/etc/omc/script/setup.sh index 0c6a616..7b2d194 100644 --- a/linux/usr/local/etc/omc/script/setup.sh +++ b/linux/usr/local/etc/omc/script/setup.sh @@ -19,7 +19,7 @@ usage() { echo "Program Initialization OPTION:" echo " -i, --install Specify the install" echo " -u, --upgrade Specify the upgrade" - echo " -m, --mode Available the mode (standard/lite)" + echo " -m, --mode Available the mode (std/lite)" echo " -c, --customize Available the customize (omc/agt/ba)" echo " -h Display this help message" echo @@ -69,21 +69,21 @@ fi # Determine if -m is passed in if [ -n "$M_PARAM" ]; then - # Check that mode is within the standard range - if [[ "$M_PARAM" != "standard" && "$M_PARAM" != "lite" ]]; then - echo "Error: M_PARAM can only be 'standard' or 'lite'." + # Check that mode is within the std range + if [[ "$M_PARAM" != "std" && "$M_PARAM" != "lite" ]]; then + echo "Error: M_PARAM can only be 'std' or 'lite'." exit 1 fi sed -i "s/MODE=.*/MODE=${M_PARAM}/" $VariableFile - sed -i "s/serverVersion: \"standard\"/serverVersion: \"${M_PARAM}\"/" $confFile - sed -i "/database:/,/defaultDataSourceName:/s/\"standard\"/\"${M_PARAM}\"/" $confFile + sed -i "s/serverVersion: \"std\"/serverVersion: \"${M_PARAM}\"/" $confFile + sed -i "/database:/,/defaultDataSourceName:/s/\"std\"/\"${M_PARAM}\"/" $confFile MODE=$M_PARAM fi # echo "Mode parameter: $MODE" # Determine if -c is passed in if [ -n "$C_PARAM" ]; then - # Check if customize is within the standard + # Check if customize is within the omc/agt/ba range if [[ "$C_PARAM" != "omc" && "$C_PARAM" != "agt" && "$C_PARAM" != "ba" ]]; then echo "Error: C_PARAM can only be 'omc', 'agt' or 'ba'." exit 1 @@ -94,7 +94,7 @@ fi # echo "Customize parameter: $VENDORS" # ========================= -if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then +if [[ "$T_PARAM" == "install" && "$MODE" == "std" ]]; then if ! command -v mysql &> /dev/null || ! command -v mariadb &> /dev/null; then echo "MySQL or MariaDB not installed" exit 1 @@ -103,7 +103,7 @@ if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then rm -rf $OMCEtcDir/default/omc_db.sqlite fi if [[ "$T_PARAM" == "install" && "$MODE" == "lite" ]]; then - rm -rf $OMCEtcDir/database/standard + rm -rf $OMCEtcDir/database/std cp -rf $OMCEtcDir/default/omc_db.sqlite $OMCEtcDir/database/omc_db.sqlite fi @@ -121,4 +121,4 @@ if [[ "$T_PARAM" == "upgrade" && -d $OMCEtcDir/vendor ]]; then $OMCBinFile -c $confFile --sqlPath $OMCEtcDir/vendor/$VENDORS/database/$MODE/$T_PARAM --sqlSource $MODE fi -# bash setup.sh -i -m standard -c omc +# bash setup.sh -i -m std -c omc