feat: psap portal
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user