summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Charette <francois@archlinux.org>2009-07-20 14:17:53 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-07-20 18:43:57 +0200
commite53a4351d72d2a175d5342b71c1f19304840cd8e (patch)
tree24c11385385002841d670e7ed4127424496499c0
parent0f54cbe863f057eb197476c24e693441414e8c67 (diff)
downloaddbscripts-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-xdb-update13
1 files changed, 8 insertions, 5 deletions
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: