diff options
author | Francois Charette <francois@archlinux.org> | 2009-07-20 14:17:53 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-07-20 18:43:57 +0200 |
commit | e53a4351d72d2a175d5342b71c1f19304840cd8e (patch) | |
tree | 24c11385385002841d670e7ed4127424496499c0 | |
parent | 0f54cbe863f057eb197476c24e693441414e8c67 (diff) | |
download | dbscripts-e53a4351d72d2a175d5342b71c1f19304840cd8e.tar.gz dbscripts-e53a4351d72d2a175d5342b71c1f19304840cd8e.tar.xz |
simple syntactic improvements
[Aaron: Don't remove quotes around $WORKDIR]
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-x | db-update | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -196,15 +196,16 @@ for A in ${ARCHES[@]}; do # if non empty, move all build dirs if [ $(/bin/ls "$WORKDIR/build/" 2>/dev/null | wc -l) != 0 ]; then echo "Copying new files to '$ftppath'" - if [ $(/bin/ls "$WORKDIR/build/"*$current_arch$PKGEXT 2>/dev/null | wc -l) != 0 ]; then - for f in "$WORKDIR/build/"*$current_arch$PKGEXT; do + if [ $(/bin/ls "$WORKDIR/build/"*-$current_arch$PKGEXT 2>/dev/null | wc -l) != 0 ]; then + for f in "$WORKDIR/build/"*-$current_arch$PKGEXT; do if ! /bin/cp "$f" "$ftppath"; then die "error: failure while copying files to $ftppath" fi done fi - if [ $(/bin/ls "$WORKDIR/build/"*any$PKGEXT 2>/dev/null | wc -l) != 0 ]; then - for f in "$WORKDIR/build/"*any$PKGEXT; do + if [ $(/bin/ls "$WORKDIR/build/"*-any$PKGEXT 2>/dev/null | wc -l) != 0 ]; then + echo "Copying new files to '$ftppath_any' and symlinking" + for f in "$WORKDIR/build/"*-any$PKGEXT; do if ! /bin/cp "$f" "$ftppath_any"; then die "error: failure while copying files to $ftppath_any" fi @@ -214,7 +215,7 @@ for A in ${ARCHES[@]}; do fi done fi - if ! /bin/cp "$WORKDIR/build/$reponame.db"* "$ftppath"; then + if ! /bin/cp "$WORKDIR/build/$reponame.db"* "$ftppath/"; then die "failed to move repository $reponame-$A". fi else @@ -228,8 +229,10 @@ for A in ${ARCHES[@]}; do repo_unlock $reponame $current_arch done + if [ -n "$to_add_any" ]; then /bin/rm $to_add_any fi + rm -rf $WORKDIR # vim: set ts=4 sw=4 noet ft=sh: |