X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhsign.sh;h=39a3f690d5dd4c27f66b9a11f01fd5a031fa9b9f;hp=9d6c747ee059bac1e655b4fd5632671d5b2da4c4;hb=ee8d01d64e8832304256de53db07228e2be67f6a;hpb=bd7e2d5cc610c87f2f8c2df507bb7eda86cce90e diff --git a/uip/mhsign.sh b/uip/mhsign.sh index 9d6c747..39a3f69 100755 --- a/uip/mhsign.sh +++ b/uip/mhsign.sh @@ -22,10 +22,11 @@ if [ -z "$userid" ] ; then userid="`mhparam pgpkey`" fi if [ -z "$userid" ] ; then - userid="`gpg --list-secret-keys --with-colons 2>/dev/null | + userid="`gpg --list-secret-keys --with-colons --fixed-list-mode \ + 2>/dev/null | grep '^sec' | sort -t: -k3,3nr -k 6,6nr | awk -F: ' - $7=="" || $7 > "'"\`date +%Y-%m-%d\`"'" { + $7=="" || $7 > "'"\`date +%s\`"'" { print $5; exit; } '`"