From f4977d071b032c9105ad868eea24198fc082ad32 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 18 Mar 2025 15:21:59 +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 | 14 +++++++------- pkg.sh | 4 +--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/build/linux/usr/local/etc/omc/script/setup.sh b/build/linux/usr/local/etc/omc/script/setup.sh index dbf2a6a4..e361da41 100644 --- a/build/linux/usr/local/etc/omc/script/setup.sh +++ b/build/linux/usr/local/etc/omc/script/setup.sh @@ -38,9 +38,9 @@ standardEnv() { # Different processing depending on the value of customize 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 + cp -rf $OMCEtcDir/vendor/$VENDORS/web/* $OMCEtcDir/web/background + cp -rf $OMCEtcDir/vendor/$VENDORS/static/* /usr/local/$VENDORS/static + $OMCBinFile -c $confFile --sqlPath $OMCEtcDir/vendor/$VENDORS/database/$MODE/customized.sql --sqlSource $MODE } # ========================= @@ -83,7 +83,7 @@ if [ -z "$T_PARAM" ]; then echo "Error: You must specify -i (install) or -u (upgrade) first." usage fi -echo "Type parameter: $T_PARAM" +#echo "Type parameter: $T_PARAM" # Determine if -m is passed in if [ -n "$M_PARAM" ]; then @@ -97,7 +97,7 @@ if [ -n "$M_PARAM" ]; then sed -i "s/serverVersion: \"standard\"/serverVersion: \"${M_PARAM}\"/" $confFile MODE=$M_PARAM fi -echo "Mode parameter: $MODE" +#echo "Mode parameter: $MODE" # Determine if -c is passed in if [ -n "$C_PARAM" ]; then @@ -110,7 +110,7 @@ if [ -n "$C_PARAM" ]; then sed -i "s/VENDORS=.*/VENDORS=${C_PARAM}/" $VariableFile VENDORS=$C_PARAM fi -echo "Customize parameter: $VENDORS" +#echo "Customize parameter: $VENDORS" # ========================= @@ -118,7 +118,7 @@ if [ "$MODE" = "standard" ]; then standardEnv fi -$OMCBinFile -c $confFile --sqlPath $OMCEtcDir/database/$DBSource/$T_PARAM --sqlSource $MODE +$OMCBinFile -c $confFile --sqlPath $OMCEtcDir/database/$MODE/$T_PARAM --sqlSource $MODE customize diff --git a/pkg.sh b/pkg.sh index 8d5a5137..52f5419d 100644 --- a/pkg.sh +++ b/pkg.sh @@ -41,9 +41,6 @@ if [ -n "$BuildWeb" ]; then fi -cd $RootDir - - # =================== sshsvc echo cd $RootDir/sshsvc @@ -55,6 +52,7 @@ echo "===> go build sshsvc copy to /build/linux/usr/local/bin" # =================== omc echo +cd $RootDir 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)'"