mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 01:41:52 -05:00
repo-add: backup old database signature too
If you are keeping a copy of the old database, you probably want to keep a copy of its signature too. Also, delete the previously backed-up database signature if no new one is being copied. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
043931ca45
commit
eda741ae93
@ -642,7 +642,11 @@ if (( success )); then
|
||||
create_signature "$tmpdir/$filename"
|
||||
|
||||
[[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
|
||||
[[ -f $REPO_DB_FILE.sig ]] && rm -f "$REPO_DB_FILE.sig"
|
||||
if [[ -f $REPO_DB_FILE.sig ]]; then
|
||||
mv -f "$REPO_DB_FILE.sig" "$REPO_DB_FILE.old.sig"
|
||||
else
|
||||
rm -f "$REPO_DB_FILE.old.sig"
|
||||
fi
|
||||
[[ -f $tmpdir/$filename ]] && mv "$tmpdir/$filename" "$REPO_DB_FILE"
|
||||
[[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig"
|
||||
dblink="${REPO_DB_FILE%.tar*}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user