Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index e970da38..b125035c 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -613,12 +613,14 @@ if (( success )); then
[[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig"
dblink="${REPO_DB_FILE%.tar*}"
target=${REPO_DB_FILE##*/}
- ln -sf "$target" "$dblink" 2>/dev/null || \
- ln -f "$target" "$dblink" 2>/dev/null || \
+ rm -f "$dblink"
+ ln -s "$target" "$dblink" 2>/dev/null || \
+ ln "$target" "$dblink" 2>/dev/null || \
cp "$REPO_DB_FILE" "$dblink"
if [[ -f "$target.sig" ]]; then
- ln -sf "$target.sig" "$dblink.sig" 2>/dev/null || \
- ln -f "$target.sig" "$dblink.sig" 2>/dev/null || \
+ rm -f "$dblink.sig"
+ ln -s "$target.sig" "$dblink.sig" 2>/dev/null || \
+ ln "$target.sig" "$dblink.sig" 2>/dev/null || \
cp "$REPO_DB_FILE.sig" "$dblink.sig"
fi
else