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:
authorAllan McRae <allan@archlinux.org>2011-07-18 21:05:51 +1000
committerDan McGee <dan@archlinux.org>2011-07-18 10:35:47 -0500
commitbf120635a7fdbb2caeb73fa0774bf718f2a127ae (patch)
tree6c44774ea0739dc9bdf9556f06c50171dfe9417d /scripts/repo-add.sh.in
parent3934a842b8121d6fe950fcac323e92e5e35f1538 (diff)
repo-add: always remove repo signature symlink
This prevents a dangling symlink being left behind if the repo goes from being signed to unsigned. 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.in3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 19fe660a..3fc3abc5 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -652,12 +652,11 @@ if (( success )); then
[[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig"
dblink="${REPO_DB_FILE%.tar*}"
target=${REPO_DB_FILE##*/}
- rm -f "$dblink"
+ rm -f "$dblink" "$dblink.sig"
ln -s "$target" "$dblink" 2>/dev/null || \
ln "$target" "$dblink" 2>/dev/null || \
cp "$REPO_DB_FILE" "$dblink"
if [[ -f "$target.sig" ]]; then
- 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"