From 3323d148038676617bcd691a9867fe3e3abbf1db Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Sat, 5 Nov 2016 21:37:43 -0400 Subject: [PATCH] Only delete/resign sig if it changes --- arch-ppa | 3 +-- push.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch-ppa b/arch-ppa index ddf49c3..490ed94 100755 --- a/arch-ppa +++ b/arch-ppa @@ -96,8 +96,7 @@ sign_packages() { set -e cd $(dirname $1) for pkg in "$@"; do - rm -f "${pkg}.sig" - gpg -u 'ECB9B8CBAAC68C03!' --detach-sign --use-agent $pkg + gpg -v "${pkg}.sig" 2>/dev/null || (rm -f "${pkg}.sig"; gpg -u 'ECB9B8CBAAC68C03!' --detach-sign --use-agent "$pkg") done ) } diff --git a/push.sh b/push.sh index 3df908f..21361d1 100755 --- a/push.sh +++ b/push.sh @@ -4,7 +4,7 @@ cd aur cp -a /etc/pacman.conf /etc/pacman.d/mirrorlist ./ # sign everything -gpg -u 'ECB9B8CBAAC68C03!' -b pacman.conf -gpg -u 'ECB9B8CBAAC68C03!' -b mirrorlist +gpg -v pacman.conf.sig 2>/dev/null || (rm -f pacman.conf.sig; gpg -u 'ECB9B8CBAAC68C03!' -b pacman.conf) +gpg -v mirrorlist.sig 2>/dev/null || (rm -f mirrorlist.sig; gpg -u 'ECB9B8CBAAC68C03!' -b mirrorlist) rsync -av --stats --progress --delete ./ root@mytorrentflux:/pacman/aur/