From 502813a107d7f55d806b9b25676fdbfac48fb4a1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 5 Mar 2012 16:48:19 +0100 Subject: commitpkg: Pass through the -f parameter to archrelease so unofficial repos can be used --- commitpkg.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/commitpkg.in b/commitpkg.in index 81af1c6..2c1d95a 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -42,7 +42,7 @@ pkgbase=${pkgbase:-$pkgname} case "$cmd" in commitpkg) if (( $# == 0 )); then - die 'usage: commitpkg [-s server] [-l limit] [-a arch] [commit message]' + die 'usage: commitpkg [-f] [-s server] [-l limit] [-a arch] [commit message]' fi repo="$1" shift @@ -51,7 +51,7 @@ case "$cmd" in repo="${cmd%pkg}" ;; *) - die 'usage: commitpkg [-s server] [-l limit] [-a arch] [commit message]' + die 'usage: commitpkg [-f] [-s server] [-l limit] [-a arch] [commit message]' ;; esac @@ -74,11 +74,13 @@ for i in 'changelog' 'install'; do done rsyncopts=(-e ssh -p --chmod=ug=rw,o=r -c -h -L --progress --partial -y) -while getopts ':l:a:s:' flag; do +archreleaseopts=() +while getopts ':l:a:s:f' flag; do case $flag in - s) server=$2 ;; - l) rsyncopts+=("--bwlimit=$2") ;; - a) commit_arch=$2 ;; + f) archreleaseopts+=('-f') ;; + s) server=$OPTARG ;; + l) rsyncopts+=("--bwlimit=$OPTARG") ;; + a) commit_arch=$OPTARG ;; :) die "Option requires an argument -- '$OPTARG'" ;; \?) die "Invalid option -- '$OPTARG'" ;; esac @@ -164,7 +166,7 @@ for _arch in ${arch[@]}; do commit_arches+=($_arch) fi done -archrelease "${commit_arches[@]/#/$repo-}" || die +archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die new_uploads=() -- cgit v1.2.2