diff options
Diffstat (limited to 'trunk')
-rwxr-xr-x | trunk/src/simplaret | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/trunk/src/simplaret b/trunk/src/simplaret index 9519cfe..df55526 100755 --- a/trunk/src/simplaret +++ b/trunk/src/simplaret @@ -674,10 +674,17 @@ function simplaret_get { # echo $folder/$candidate silent="--silent" fi - if [ -f "$folder/$candidate.asc" ] || [ "$SIGNATURE_CHECKING" == "$on" ]; then - gpg --verify $folder/$candidate.asc $folder/$candidate - if [ "$?" != "0" ]; then - echo "Package signature does not match. Removing package." + if [ "$SIGNATURE_CHECKING" == "$on" ]; then + if [ -f "$folder/$candidate.asc" ]; then + gpg --verify $folder/$candidate.asc $folder/$candidate + if [ "$?" != "0" ]; then + echo "Package signature does not match. Removing package." + rm -f $folder/$candidate.asc $folder/$candidate + LAST_DOWNLOADED_PACKAGE="" + return 1 + fi + else + echo "Missing signature. Removing package." rm -f $folder/$candidate.asc $folder/$candidate LAST_DOWNLOADED_PACKAGE="" return 1 |