From 868fd940aba19f79f20ad4d751fd64e9d6873559 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Tue, 18 Oct 2011 19:43:10 -0400 Subject: [PATCH] maint: changed save.sh to accept empty string argument to skip pkg file rename --- maintainer/save.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/maintainer/save.sh b/maintainer/save.sh index 3eccd131..320bf9d2 100755 --- a/maintainer/save.sh +++ b/maintainer/save.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ -z "$1" -o -z "$2" -o -z "$3" -o \( "$(whoami)" = "root" -a -z "$CHOWNUSER" \) ] ; then +if [ -z "$1" -o -z "$2" -o \( "$(whoami)" = "root" -a -z "$CHOWNUSER" \) ] ; then echo echo "Usage: ./save.sh results_dir dir_tag file_tag [script args...]" echo @@ -8,6 +8,8 @@ if [ -z "$1" -o -z "$2" -o -z "$3" -o \( "$(whoami)" = "root" -a -z "$CHOWNUSER" echo "from /results/ into build/ and renames all" echo "the files to include in the name." echo + echo "file_tag can be an empty string to skip the rename." + echo echo "Expects CHOWNUSER to be set appropriately" echo "in the environment if run as root." echo @@ -36,7 +38,8 @@ fi # We do this manually in a for loop, since the rename command is # not the same across various linux distros... -( +if [ -n "$SHORTTAG" ] ; then + ( cd "build/$TAG" for f in *.deb ; do @@ -50,5 +53,6 @@ fi mv "$f" "$(echo $f | sed "s/\.\([^.]*\)\.rpm$/.${SHORTTAG}.\1.rpm/")" fi done -) + ) +fi -- 2.11.4.GIT