Commit 99c5a986 authored by fuyanbin's avatar fuyanbin
Browse files

fix: 参数名变化

parent 08b2dea9
Pipeline #26638 passed with stages
in 7 seconds
#!/bin/bash #!/bin/bash
usage() { usage() {
echo "Usage: $0 -V | --vendor <vendor id> echo "Usage: $0 --build-directory [build directory, default: /build]
-t | --type <pipe type> --vendor <vendor>
-i | --image <image file>
--chroot-type <pack type>
--orgcode <organization code> --orgcode <organization code>
--channelid <channel id> --channel-id <channel id>
--packtype <pack type> --package-type [packtype: owner or other; default: owner]
--project-id <project id>
--pipeline-id <pipeline id>
--url-tag <url tag>
--help" --help"
exit 1 exit 1
} }
BUILD_DIR="./image_build"
VENDOR="" VENDOR=""
PIPE_TYPE="small"
CHROOT_TYPE="androidrom"
DEPLOY="elf"
ORGCODE="" ORGCODE=""
CHANNELID="" CHANNELID=""
IMAGE_FILE="" PACK_TYPE="owner"
PACK_TYPE="other" PROJECT_ID=""
PIPELINE_ID=""
URL_TAG=""
# new append CHROOT_TYPE="androidrom"
NOUPLOAD="false" DEPLOY="elf"
LOCAL="false"
export PATH=${PATH}:$(pwd)/tools/ export PATH=${PATH}:$(pwd)/tools/
PARSED_ARUGMENTS=$(getopt -a -n "$0" -o V:t:i: --long help,vendor:,type:,image:,chroot-type:,orgcode:,channelid:, -- "$@") PARSED_ARUGMENTS=$(getopt -a -n "$0" -o 'x' --long help,build-directory:,vendor:,orgcode:,channel-id:,package-type:,project-id:,pipeline-id:,url-tag: -- "$@")
eval set -- "${PARSED_ARUGMENTS}" eval set -- "${PARSED_ARUGMENTS}"
while : while :
do do
case "$1" in case "$1" in
-V | --vendor) VENDOR="$2"; shift 2 ;; --build-directory) BUILD_DIR="$2"; shift 2;;
-t | --type) PIPE_TYPE="$2"; shift 2 ;; --vendor) VENDOR="$2"; shift 2;;
-i | --image) IMAGE_FILE="$2"; shift 2 ;;
--chroot-type) CHROOT_TYPE="$2"; shift 2 ;;
--orgcode) ORGCODE="$2"; shift 2;; --orgcode) ORGCODE="$2"; shift 2;;
--channelid) CHANNELID="$2"; shift 2;; --channel-id) CHANNELID="$2"; shift 2;;
--packtype) PACK_TYPE="$2"; shift 2;; --package-type) PACK_TYPE="$2"; shift 2;;
--project-id) PROJECT_ID="$2"; shift 2;;
--pipeline-id) PIPELINE_ID="$2"; shift 2;;
--url-tag) URL_TAG="$2"; shift 2;;
--help) usage ;; --help) usage ;;
--) shift; break;; --) shift; break;;
*) usage ;; *) usage ;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment