1
0

feat: psap portal

This commit is contained in:
zhangsz
2025-04-15 11:42:08 +08:00
parent 4215a73c8c
commit 150d7aadbc
2 changed files with 16 additions and 13 deletions

View File

@@ -11,12 +11,19 @@ usage() {
echo " -m, =be|fe|all be: only process back-end code, default if non input"
echo " fe: only process front-end code"
echo " all: process all include be and fe"
echo " -c, =ba ba: customized for BA OMC"
echo " -c, =ba|psap ba: customized for BA OMC, psap: customized for PSAP Portal"
}
pkgtype=""
new_args=()
be_args=()
handle_invalid_option() {
echo "Invalid option: -$1" >&2
usage
exit 2
}
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "rpm" ]]; then
@@ -54,19 +61,15 @@ while getopts "m:r:c:d" option; do
if [ "${c_arg}" == "ba" ]; then
pkgtype="badeb"
be_args+=("${pkgtype}")
else if [ "${c_arg}" == "psap" ]; then
elif [ "${c_arg}" == "psap" ]; then
pkgtype="psapdeb"
be_args+=("${pkgtype}")
else
echo "Invalid option: -$OPTARG" >&2
usage
exit 2
fi
handle_invalid_option "$OPTARG"
fi
;;
\?)
echo "Invalid option: -$OPTARG" >&2
usage
exit 2
handle_invalid_option "$OPTARG"
;;
esac
done