summaryrefslogtreecommitdiffstats
path: root/db-update
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-06-29 10:59:16 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-06-29 10:59:16 +0200
commitd989142a17315f20f038d025008350fc413ca5f1 (patch)
treead6ee6de95cf624f883b83f805479fecc156d231 /db-update
parentf67f54fa2412e68fc02c6048f7dcee6223ccbc18 (diff)
downloaddbscripts-d989142a17315f20f038d025008350fc413ca5f1.tar.gz
dbscripts-d989142a17315f20f038d025008350fc413ca5f1.tar.xz
don't fail if any package already exists
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update14
1 files changed, 9 insertions, 5 deletions
diff --git a/db-update b/db-update
index 64265d0..f05246b 100755
--- a/db-update
+++ b/db-update
@@ -239,12 +239,16 @@ for current_arch in ${ARCHES[@]}; do
echo "Copying new files to '$ftppath_any' and symlinking"
for f in "$WORKDIR/build/"*-any$PKGEXT; do
/bin/chmod 664 "$f" &>/dev/null
- if ! /bin/cp "$f" "$poolpath_any/"; then
- die "error: failure while copying files to $poolpath_any"
- fi
fname="$(basename $f)"
- if ! ln -s "$poolrel_any/$fname" "$ftppath_any/$fname"; then
- die "error: failure symlinking $fname to $ftppath_any"
+ if [ ! -f "$poolrel_any/$fname" ]; then
+ if ! /bin/cp "$f" "$poolpath_any/"; then
+ die "error: failure while copying files to $poolpath_any"
+ fi
+ fi
+ if [ ! -f "$ftppath_any/$fname" ]; then
+ if ! ln -s "$poolrel_any/$fname" "$ftppath_any/$fname"; then
+ die "error: failure symlinking $fname to $ftppath_any"
+ fi
fi
if ! ln -s "$poolrel_any/$fname" "$ftppath/$fname"; then
die "error: failure symlinking $fname to $ftppath"