- while getopts "f:d:p:m:s:t:b:o:c:w:W:M:yg:u:BTnv7i:" opt ; do
- case $opt in
- f) FCDISTRO=$OPTARG ;;
- d) PLDISTRO=$OPTARG ;;
- p) PERSONALITY=$OPTARG ;;
- m) MAILTO=$OPTARG ;;
- s) build_SVNPATH=$OPTARG ;;
- t) PLDISTROTAGS=$OPTARG ;;
- b) BASE=$OPTARG ;;
- o) OVERBASE=$OPTARG ;;
- c) TESTCONFIG="$TESTCONFIG $OPTARG" ;;
- w) WEBPATH=$OPTARG ;;
- W) TESTBUILDURL=$OPTARG ;;
- M) TESTMASTER=$OPTARG ;;
- y) SIGNYUMREPO=true ;;
- g) GPGPATH=$OPTARG ;;
- u) GPGUID=$OPTARG ;;
- B) DO_TEST= ;;
- T) DO_BUILD= ;;
- n) DRY_RUN="-n" ;;
- v) set -x ;;
- 7) BASE="$(date +%a|tr A-Z a-z)-@FCDISTRO@" ;;
- i) IFNAME=$OPTARG ;;
- h|*) usage ;;
+
+ OPTS_ORIG=$@
+ OPTS=$(getopt -o "f:d:p:m:s:t:b:o:c:y:x:w:W:r:M:Yg:u:K:SBTnv7i:h" -l "build-branch:" -- $@)
+ if [ $? != 0 ]
+ then
+ usage
+ fi
+ eval set -- "$OPTS"
+ while true; do
+ case $1 in
+ -f) FCDISTRO=$2; shift 2 ;;
+ -d) PLDISTRO=$2; shift 2 ;;
+ -p) PERSONALITY=$2; shift 2 ;;
+ -m) MAILTO=$2; shift 2 ;;
+ -s) BUILD_SCM_URL=$2; shift 2 ;;
+ -t) PLDISTROTAGS=$2; shift 2 ;;
+ -b) BASE=$2; shift 2 ;;
+ -o) OVERBASE=$2; shift 2 ;;
+ -c) TESTCONFIG="$TESTCONFIG $2"; shift 2 ;;
+ -y) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS -y $2"; shift 2 ;;
+ -x) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS $2"; shift 2;;
+ -w) WEBPATH=$2; shift 2 ;;
+ -W) TESTBUILDURL=$2; shift 2 ;;
+ -r) WEBROOT=$2; shift 2 ;;
+ -M) TESTMASTER=$2; shift 2 ;;
+ -Y) SIGNYUMREPO=true; shift ;;
+ -g) GPGPATH=$2; shift 2 ;;
+ -u) GPGUID=$2; shift 2 ;;
+ -K) SSH_KEY=$2; shift 2 ;;
+ -S) PUBLISH_SRPMS="" ; shift ;;
+ -B) DO_TEST= ; shift ;;
+ -T) DO_BUILD= ; shift;;
+ -n) DRY_RUN="-n" ; shift ;;
+ -v) set -x ; VERBOSE="-v" ; shift ;;
+ -7) BASE="$(date +%a|tr A-Z a-z)-@FCDISTRO@" ; shift ;;
+ -i) IFNAME=$2; shift 2 ;;
+ -h) usage ; shift ;;
+ --) shift; break ;;