From d989142a17315f20f038d025008350fc413ca5f1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 29 Jun 2010 10:59:16 +0200 Subject: don't fail if any package already exists --- db-update | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'db-update') 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" -- cgit v1.2.3-24-g4f1b