From f0d817a0deb150f576ee7733f5be40bd981f81cf Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 29 Dec 2008 13:26:02 -0800 Subject: Misc make-sourceball fixes and updates * --allsource places packages in dirs with the pkgname * Syntax errors with if statement and globbing * Set and restore umask Signed-off-by: Aaron Griffin --- misc-scripts/make-sourceball | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'misc-scripts') diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index 7a02abf..44c3815 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -18,7 +18,7 @@ srcpath="$FTP_BASE/sources/" WORKDIR="/tmp/make-sourceball.$packagename.$UID" cleanup() { - # unlock + restore_umask rm -rf "$WORKDIR" [ "$1" ] && exit $1 } @@ -50,13 +50,13 @@ create_srcpackage() { mkdir -p "$srcpath" fi #Remove old sourceballs - for pkg in "$srcpath/$pkgname-*"; do + for pkg in "$srcpath/$pkgname-"*; do pkg="$(basename $pkg)" - if "$(getpkgname $pkg)" == "$pkgname" ]; then + if [ "$(getpkgname $pkg)" == "$pkgname" ]; then rm -f "$srcpath/$pkg" fi done - cp $pkg_file "$srcpath" + cp "$pkgname/$pkg_file" "$srcpath" return 0 fi @@ -65,6 +65,7 @@ create_srcpackage() { trap ctrl_c 2 trap cleanup 0 1 +set_umask /bin/mkdir -p "$WORKDIR" cd "$WORKDIR" -- cgit v1.2.3-24-g4f1b