diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-06-29 10:59:16 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-06-29 10:59:16 +0200 |
commit | d989142a17315f20f038d025008350fc413ca5f1 (patch) | |
tree | ad6ee6de95cf624f883b83f805479fecc156d231 | |
parent | f67f54fa2412e68fc02c6048f7dcee6223ccbc18 (diff) | |
download | dbscripts-d989142a17315f20f038d025008350fc413ca5f1.tar.gz dbscripts-d989142a17315f20f038d025008350fc413ca5f1.tar.xz |
don't fail if any package already exists
-rwxr-xr-x | db-update | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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" |