The -v
is an argument for command
builtin not for the gpg
, it's not looking for "gpg" version, it's looking to see if any command named "gpg" exist.
From help command
:
-v print a description of COMMAND similar to the `type' builtin
it's similar to type
builtin:
$ command -v gpg
/usr/bin/gpg
If it wasn't able to find the command, it'll return a non-zero exit status, so the "OR" section will be run:
|| { ... }
which will prints out:
Cound not find gpg. Aborting.
with an exit status code of "1".