Match-id-02b24c548c6d4abff63e646ae39800f983b729ac

This commit is contained in:
BianTanggui
2022-03-16 10:33:33 +08:00
parent 4d8db25b16
commit 5e8d292f65

View File

@@ -124,38 +124,66 @@ while true
do do
case "$3" in case "$3" in
--install) --install)
if [ "${INSTALL_FLAG}" == "y" ]; then
echo "warning :Repeat parameter!"
exit 1
fi
INSTALL_FLAG=y INSTALL_FLAG=y
shift shift
;; ;;
--uninstall) --uninstall)
if [ "${UNINSTALL_FLAG}" == "y" ]; then
echo "warning :Repeat parameter!"
exit 1
fi
UNINSTALL_FLAG=y UNINSTALL_FLAG=y
shift shift
;; ;;
--install-path=*) --install-path=*)
if [ "${INSTALL_PATH_FLAG}" == "y" ]; then
echo "warning :Repeat parameter!"
exit 1
fi
INSTALL_PATH_FLAG=y INSTALL_PATH_FLAG=y
INSTALL_PATH=$(echo $3 | cut -d"=" -f2) INSTALL_PATH=$(echo $3 | cut -d"=" -f2)
INSTALL_PATH=$(echo ${INSTALL_PATH} | sed "s/\/*$//g") INSTALL_PATH=$(echo ${INSTALL_PATH} | sed "s/\/*$//g")
shift shift
;; ;;
--upgrade) --upgrade)
if [ "${UPGRADE_FLAG}" == "y" ]; then
echo "warning :Repeat parameter!"
exit 1
fi
UPGRADE_FLAG=y UPGRADE_FLAG=y
shift shift
;; ;;
--devel) --devel)
if [ "${DEVEL_FLAG}" == "y" ]; then
echo "warning :Repeat parameter!"
exit 1
fi
DEVEL_FLAG=y DEVEL_FLAG=y
shift shift
;; ;;
--install-type=*) --install-type=*)
if [ "${a500}" == "y" ] || [ "${a200}" == "y" ]; then
echo "warning :Repeat parameter!"
exit 1
fi
# 去除指定安装目录后所有的 "/" # 去除指定安装目录后所有的 "/"
if [ "$3" == "--install-type=A500" ]; then if [ "$3" == "--install-type=A500" ]; then
a500=y a500=y
elif [ "$3" == "--install-type=A200" ]; then elif [ "$3" == "--install-type=A200" ]; then
a200=y a200=y
else
echo "error :Please check the parameter of --install-type=<type>"
exit 1
fi fi
shift shift
;; ;;
*) *)
break echo "warning :Unsupported parameters: $3"
exit 1
;; ;;
esac esac
done done