From e53a4351d72d2a175d5342b71c1f19304840cd8e Mon Sep 17 00:00:00 2001 From: Francois Charette Date: Mon, 20 Jul 2009 14:17:53 +0200 Subject: simple syntactic improvements [Aaron: Don't remove quotes around $WORKDIR] Signed-off-by: Aaron Griffin --- db-update | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index 67f8782..b530987 100755 --- a/db-update +++ b/db-update @@ -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: -- cgit v1.2.3-24-g4f1b