From 8c94cf6bc04de17861a6d99249972377d6cfe94e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 30 Apr 2025 19:08:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8D=87=E7=BA=A7=E6=97=B6=E5=89=8D?= =?UTF-8?q?=E7=AB=AFconfig.js=E8=A6=86=E7=9B=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg-en.sh | 4 +--- pkg-front.sh | 4 +--- pkg.sh | 4 +--- pkg/deb/DEBIAN/postinst | 1 + pkg/rpm/SPECS/omc.spec | 1 + 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pkg-en.sh b/pkg-en.sh index 51afa71..e077340 100644 --- a/pkg-en.sh +++ b/pkg-en.sh @@ -55,9 +55,7 @@ if [ -n "$BuildWeb" ]; then npm run build output=$BuildDir/linux/usr/local/etc/omc/web - rm -rf $output - cp -rf dist/default/config.js dist/config.js - cp -rf dist $output + rm -rf $output && cp -rf dist $output echo "===> web build dist copy to $output" fi diff --git a/pkg-front.sh b/pkg-front.sh index fde9d1d..3f6100e 100644 --- a/pkg-front.sh +++ b/pkg-front.sh @@ -41,9 +41,7 @@ if [ -n "$BuildWeb" ]; then scp -r -P 18422 $ScpWeb:$WebDir/dist $WebDir/ output=$BuildDir/linux/usr/local/etc/omc/web - rm -rf $output - cp -rf dist/default/config.js dist/config.js - cp -rf dist $output + rm -rf $output && cp -rf dist $output echo "===> web build dist copy to $output" fi diff --git a/pkg.sh b/pkg.sh index fcdb054..7fcab88 100644 --- a/pkg.sh +++ b/pkg.sh @@ -53,9 +53,7 @@ if [ -n "$BuildWeb" ]; then npm run build output=$BuildDir/linux/usr/local/etc/omc/web - rm -rf $output - cp -rf dist/default/config.js dist/config.js - cp -rf dist $output + rm -rf $output && cp -rf dist $output echo "===> web build dist copy to $output" fi diff --git a/pkg/deb/DEBIAN/postinst b/pkg/deb/DEBIAN/postinst index f280efa..420f917 100644 --- a/pkg/deb/DEBIAN/postinst +++ b/pkg/deb/DEBIAN/postinst @@ -16,6 +16,7 @@ if [ ! -f $RootDir/omc.conf ]; then cp $RootDir/default/omc.conf $RootDir/omc.conf cp $RootDir/default/omc.yaml $RootDir/omc.yaml cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml + cp $RootDir/web/default/config.js $RootDir/web/config.js # read environment parameter and to do if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then diff --git a/pkg/rpm/SPECS/omc.spec b/pkg/rpm/SPECS/omc.spec index 34aca44..df3514c 100644 --- a/pkg/rpm/SPECS/omc.spec +++ b/pkg/rpm/SPECS/omc.spec @@ -48,6 +48,7 @@ if [ ! -f $RootDir/omc.conf ]; then cp $RootDir/default/omc.conf $RootDir/omc.conf cp $RootDir/default/omc.yaml $RootDir/omc.yaml cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml + cp $RootDir/web/default/config.js $RootDir/web/config.js # read environment parameter and to do if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then