perf: 构建工具调整

This commit is contained in:
TsMask
2025-03-19 10:06:25 +08:00
parent ea57e594bf
commit d2ed6b8d3b
2 changed files with 5 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -x
OMCBinFile=/usr/local/bin/omc
OMCEtcDir=/usr/local/etc/omc
confFile=$OMCEtcDir/omc.yaml
@@ -26,13 +26,6 @@ usage() {
exit 1
}
# Different processing depending on the value of customize
customize() {
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
}
# =========================
while [[ $# -gt 0 ]]; do
@@ -72,7 +65,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
@@ -85,7 +78,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
@@ -97,7 +90,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"
# =========================
if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then

View File

@@ -27,7 +27,7 @@ if [ ! -f $RootDir/omc.conf ]; then
fi
if [ $? -ne 0 ]; then
echo "Initialization failure."
rm -rf $RootDir
#rm -rf $RootDir
exit 1
fi