if [ -z $1 ]; then
echo
- echo smgl-keyring-diff shows changes to the gpg keyring in git repository
+ echo $(basename $0) shows changes to the gpg keyring in git repository
echo
- echo To show the last change to the gurus.gpg run
- echo smgl-keyring-diff gurus.gpg
+ echo To show the last change to the gurus.gpg run:
+ echo $(basename $0) gurus.gpg
echo
- echo To show change No. 1 run
- echo smgl-keyring-diff gurus.gpg 1
+ echo To show change No. 1 run:
+ echo $(basename $0) gurus.gpg 1
+ echo
+ echo It also works with negative numbers. For example
+ echo to show preprevious change run:
+ echo $(basename $0) gurus.gpg -2
echo
exit 1
fi
@@ -20,6 +24,8 @@ echo The $1 keyring has been changed $C times.
if [ -z $2 ]; then
B=1
+elif [ $2 -lt 0 ];then
+ B=$((0-$2))
else
B=$(($C-$2+1))
fi
[SM-Commit] GIT changes to master guru-tools by Bor Kraljič (388752353d02e321fedf2199c469e3cbd7bc246e),
Bor Kraljič, 09/01/2010