From 07e4d3fa638c34bfc42ea94c5aa604d77cc40969 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 18 Mar 2025 15:07:21 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=9E=84=E5=BB=BA=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/linux/usr/local/etc/omc/script/setup.sh | 10 ++++++---- pkg.sh | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build/linux/usr/local/etc/omc/script/setup.sh b/build/linux/usr/local/etc/omc/script/setup.sh index 41bd8870..dbf2a6a4 100644 --- a/build/linux/usr/local/etc/omc/script/setup.sh +++ b/build/linux/usr/local/etc/omc/script/setup.sh @@ -36,9 +36,11 @@ standardEnv() { fi } -# customize +# Different processing depending on the value of customize customize() { - echo "customize" + cp -rf $OMCEtcDir/vendor/$C_PARAM/web/* $OMCEtcDir/web/background + cp -rf $OMCEtcDir/vendor/$C_PARAM/static/* /usr/local/$C_PARAM/static + $OMCBinFile -c $confFile --sqlPath $OMCEtcDir/vendor/$C_PARAM/database/$DBSource/customized.sql --sqlSource $MODE } # ========================= @@ -86,7 +88,7 @@ echo "Type parameter: $T_PARAM" # Determine if -m is passed in if [ -n "$M_PARAM" ]; then # Check that mode is within the standard range - if [[ "$mode" != "standard" && "$mode" != "lite" ]]; then + if [[ "$M_PARAM" != "standard" && "$M_PARAM" != "lite" ]]; then echo "Error: -m can only be 'standard' or 'lite'." exit 1 fi @@ -100,7 +102,7 @@ echo "Mode parameter: $MODE" # Determine if -c is passed in if [ -n "$C_PARAM" ]; then # Check if customize is within the standard - if [[ "$customize" != "omc" && "$customize" != "agt" && "$customize" != "ba" ]]; then + if [[ "$C_PARAM" != "omc" && "$C_PARAM" != "agt" && "$C_PARAM" != "ba" ]]; then echo "Error: -c can only be 'omc', 'agt' or 'ba'." exit 1 fi diff --git a/pkg.sh b/pkg.sh index eda1f283..8d5a5137 100644 --- a/pkg.sh +++ b/pkg.sh @@ -27,7 +27,7 @@ while [[ $# -gt 0 ]]; do esac done -# =================== +# =================== Web echo # Determine if -web is passed in if [ -n "$BuildWeb" ]; then @@ -44,7 +44,7 @@ fi cd $RootDir -# =================== +# =================== sshsvc echo cd $RootDir/sshsvc make @@ -53,7 +53,7 @@ cp -rf sshsvc $RootDir/build/linux/usr/local/bin/sshsvc echo "===> go build sshsvc copy to /build/linux/usr/local/bin" -# =================== +# =================== omc echo MOD_CONFIG="be.ems/src/framework/config" go build -o omc -v -ldflags "-s -w -X '$MOD_CONFIG.Version=$VERSION' -X '$MOD_CONFIG.BuildTime=$(date)' -X '$MOD_CONFIG.GoVer=$(go version)'" @@ -62,6 +62,6 @@ cp -rf omc $RootDir/build/linux/usr/local/bin/omc echo "===> go build omc copy to /build/linux/usr/local/bin" -# =================== +# =================== deb/rpm echo bash $RootDir/build/build.sh -v $VERSION