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