[misc] 01/01: prebuilder: Allow specifying the target package via a *.dsc filename.

Daniel Shahaf danielsh at apache.org
Mon May 22 11:04:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

danielsh-guest pushed a commit to branch master
in repository misc.

commit bddae0583390dd6586919a7d525ef193568d94b5
Author: Daniel Shahaf <danielsh at apache.org>
Date:   Mon May 22 11:02:34 2017 +0000

    prebuilder: Allow specifying the target package via a *.dsc filename.
    
    In the common case, I have just one *.dsc file in the current directory.
    This patch allows one to run «rebuild.sh *.dsc» (literally) rather than
    «rebuild.sh hello».
---
 prebuilder/rebuild.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/prebuilder/rebuild.sh b/prebuilder/rebuild.sh
index d839634..b3d60c3 100755
--- a/prebuilder/rebuild.sh
+++ b/prebuilder/rebuild.sh
@@ -21,7 +21,8 @@ usage() {
     echo "  -b BASETGZ    Specify path to pbuilder's --basetgz."
     echo "  -c            Use cowbuilder."
     echo "  -h            Show this usage message."
-    echo "  PACKAGENAME   Name of a *.dsc source package file, up to the underscore."
+    echo "  PACKAGENAME   Name of a *.dsc source package file."
+    echo "                The name may be given up to underscore, or in full."
     echo "                The file must exist in the current directory."
 }
 
@@ -50,7 +51,9 @@ if [ $# -ne 1 ]; then
 fi
 
 PACKAGE="$1"
-case ${PACKAGE#./} in
+PACKAGE=${PACKAGE#./}
+PACKAGE=${PACKAGE%_*}
+case ${PACKAGE} in
   */*) echo >&2 "$MYNAME: error: Package file must be in the current directory."; exit 1;;
 esac
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list