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:
authorEric Bélanger <snowmaniscool@gmail.com>2011-06-26 15:13:48 -0400
committerDan McGee <dan@archlinux.org>2011-06-27 09:24:41 -0500
commit51ed7dff0d30a5dcb73ce271e5d02bdb0d119cb9 (patch)
tree0a7d2a4540d3a226cfec30c234e67d71b4529c16 /scripts/repo-add.sh.in
parentf5dc5c46e0cf212c32ed149e22331f99764355c4 (diff)
Remove -f option from ln for POSIX compliance
Fixes FS#24893. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
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