diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-12-29 22:26:02 +0100 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-12-29 22:26:02 +0100 |
commit | f0d817a0deb150f576ee7733f5be40bd981f81cf (patch) | |
tree | 72da93d6d720c4c662802354ebc0c983763aa666 /misc-scripts | |
parent | 1c30298885f581f3bf3731576374da7044973747 (diff) | |
download | dbscripts-f0d817a0deb150f576ee7733f5be40bd981f81cf.tar.gz dbscripts-f0d817a0deb150f576ee7733f5be40bd981f81cf.tar.xz |
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 <aaronmgriffin@gmail.com>
Diffstat (limited to 'misc-scripts')
-rwxr-xr-x | misc-scripts/make-sourceball | 9 |
1 files changed, 5 insertions, 4 deletions
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" |