Commit 6d43c0ac authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbph: fix -n -u param handling

parent 4489a7dd
...@@ -288,16 +288,16 @@ phelp() ...@@ -288,16 +288,16 @@ phelp()
} }
while getopts :hniuvqb: opt; do while getopts :hnuivqb: opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0 ;;
n) NOBUILD=1;; n) NOBUILD=1 ;;
v) VERBOSE=1;; u) UPLOADARG="-$opt" ;;
b) BINARYREPONAME=$OPTARG ;; v) VERBOSE=1 ;;
q) QUIET=1;; b) BINARYREPONAME=$OPTARG ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;; q) QUIET=1 ;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;; +?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
?) OPTIND=$((OPTIND-1)); break; ?) OPTIND=$((OPTIND-1)); break;
esac esac
done done
...@@ -306,8 +306,8 @@ if [ $# -gt 0 ]; then ...@@ -306,8 +306,8 @@ if [ $# -gt 0 ]; then
shift $((OPTIND - 1)) shift $((OPTIND - 1))
fi fi
# pass other options to RPM (exclude -n -v): # pass other options to RPM (exclude -v):
LISTRPMARGS=$(drop_args "$*" n v) LISTRPMARGS=$(drop_args "$*" v)
} }
set_girar_host $1 && shift set_girar_host $1 && shift
...@@ -388,7 +388,8 @@ if [ "$VENDOR" = "alt" ] && is_gear $SPECDIR ; then ...@@ -388,7 +388,8 @@ if [ "$VENDOR" = "alt" ] && is_gear $SPECDIR ; then
fatal "Commit error. You are still in $MDISTR branch with modified and uncommitted spec" fatal "Commit error. You are still in $MDISTR branch with modified and uncommitted spec"
fi fi
[ -n "$NOBUILD" ] && BUILDCOMMAND="$ETERBUILDBIN/rpmbs $GIRARHOST" [ -n "$NOBUILD" ] && BUILDCOMMAND="$ETERBUILDBIN/rpmbs $GIRARHOST"
$BUILDCOMMAND $LISTRPMARGS $REMOTEBUILD $DISTRARG $SPEC || { git checkout $CURBRANCH ; fatal "Can't build" ; } echo "Run $BUILDCOMMAND"
$BUILDCOMMAND $LISTRPMARGS $UPLOADARG $REMOTEBUILD $DISTRARG $SPEC || { git checkout $CURBRANCH ; fatal "Can't build" ; }
git checkout $CURBRANCH git checkout $CURBRANCH
exit $? exit $?
fi fi
...@@ -411,6 +412,6 @@ for i in $LISTBUILT ; do ...@@ -411,6 +412,6 @@ for i in $LISTBUILT ; do
# FIXME: do not remove if not repacked # FIXME: do not remove if not repacked
#rm -f $SPKG #rm -f $SPKG
altspec_to_local $SPECNAME altspec_to_local $SPECNAME
$BUILDCOMMAND $LISTRPMARGS $REMOTEBUILD $DISTRARG $SPECNAME || fatal "Can't build" $BUILDCOMMAND $LISTRPMARGS $UPLOADARG $REMOTEBUILD $DISTRARG $SPECNAME || fatal "Can't build"
done done
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