perf: 构建工具调整
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user