| 1 | =begin |
| 2 | GPG passphrase check |
| 3 | |
| 4 | ruby gpg_check_passphrase passphrase |
| 5 | |
| 6 | invokes gpg and checks whether given passphrase is correct |
| 7 | =end |
| 8 | |
| 9 | require 'gpgmime' |
| 10 | if GpgMime.new.check_passphrase( ARGV[0] ) |
| 11 | result = 0 |
| 12 | else |
| 13 | result = -1 |
| 14 | end |
| 15 | |
| 16 | exit result |
| 17 | |
| 18 | __END__ |

