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

fix: 参数名变化

parent 08b2dea9
Pipeline #26638 passed with stages
in 7 seconds
#!/bin/bash
usage() {
echo "Usage: $0 -V | --vendor <vendor id>
-t | --type <pipe type>
-i | --image <image file>
--chroot-type <pack type>
echo "Usage: $0 --build-directory [build directory, default: /build]
--vendor <vendor>
--orgcode <organization code>
--channelid <channel id>
--packtype <pack type>
--channel-id <channel id>
--package-type [packtype: owner or other; default: owner]
--project-id <project id>
--pipeline-id <pipeline id>
--url-tag <url tag>
--help"
exit 1
}
BUILD_DIR="./image_build"
VENDOR=""
PIPE_TYPE="small"
CHROOT_TYPE="androidrom"
DEPLOY="elf"
ORGCODE=""
CHANNELID=""
IMAGE_FILE=""
PACK_TYPE="other"
PACK_TYPE="owner"
PROJECT_ID=""
PIPELINE_ID=""
URL_TAG=""
# new append
NOUPLOAD="false"
LOCAL="false"
CHROOT_TYPE="androidrom"
DEPLOY="elf"
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}"
while :
do
case "$1" in
-V | --vendor) VENDOR="$2"; shift 2 ;;
-t | --type) PIPE_TYPE="$2"; shift 2 ;;
-i | --image) IMAGE_FILE="$2"; shift 2 ;;
--chroot-type) CHROOT_TYPE="$2"; shift 2 ;;
--build-directory) BUILD_DIR="$2"; shift 2;;
--vendor) VENDOR="$2"; shift 2;;
--orgcode) ORGCODE="$2"; shift 2;;
--channelid) CHANNELID="$2"; shift 2;;
--packtype) PACK_TYPE="$2"; shift 2;;
--channel-id) CHANNELID="$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 ;;
--) shift; break;;
*) 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