X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fbuildd-remove-keys;h=0ea4c23dc33afebf6031e7b9d15811a84470e0e7;hb=1e635a1eca99ce9535cf43229a447aa2b5de0b4c;hp=c07ff04b144bba0cba43f272a87de293168c5729;hpb=714b2bd26b5a5ba4c205de7d4fe51408edf3c14a;p=dak.git diff --git a/scripts/debian/buildd-remove-keys b/scripts/debian/buildd-remove-keys index c07ff04b..0ea4c23d 100755 --- a/scripts/debian/buildd-remove-keys +++ b/scripts/debian/buildd-remove-keys @@ -75,8 +75,8 @@ for file in $(ls -1 ${INCOMING}/*.del ); do file=${file##*/} # First we want to see if we recognize the filename. The buildd people have # to follow a certain schema: - # architecture_builddname.YEAR-MONTH-DAY_HOUR:MINUTE.del - if [[ $file =~ (.*)_(.*).([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}:[0-9]{2}).del ]]; then + # architecture_builddname.YEAR-MONTH-DAY_HOURMINUTE.del + if [[ $file =~ (.*)_(.*).([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}[0-9]{2}).del ]]; then ARCH=${BASH_REMATCH[1]} BUILDD=${BASH_REMATCH[2]} # Right now timestamp is unused @@ -172,7 +172,7 @@ for file in $(ls -1 ${INCOMING}/*.del ); do ARCHKEYRING="${base}/${ARCH}/keyring.gpg" # Is the key in there? - KEYNO=$(gpg ${DEFGPGOPT} --keyring "${ARCHKEYRING}" --with-colons --list-keys ${KEYID} | grep -c '^pub:') + KEYNO=$(gpg ${DEFGPGOPT} --keyring "${ARCHKEYRING}" --with-colons --list-keys ${KEYID} | grep -c '^pub:' || /bin/true ) if [ $KEYNO -eq 1 ]; then # Right, exactly one there, lets get rid of it