nnn

mirror of https://github.com/jarun/nnn
Log | Files | Refs | README | LICENSE

gpgv (674B)


      1 #!/usr/bin/env sh
      2 
      3 # Description: verifies signed files using gpg.
      4 #              includes options for detached signing
      5 #              (in which case it asks for a document to verify)
      6 #              as well as normal signing
      7 #
      8 # Note: Uses the current file only [selections not supported]
      9 #
     10 # Shell: POSIX compliant
     11 # Author: wassup05
     12 
     13 file=$1
     14 
     15 printf "(s)ign/(d)etach-sig [default=s] "
     16 read -r sig_resp
     17 
     18 if [ "$sig_resp" = "d" ]; then
     19     printf "Enter document name: "
     20     read -r doc_name
     21     command gpg --verify "$file" "$doc_name"
     22 else
     23     command gpg --verify "$file"
     24 fi
     25 
     26 printf "\n"
     27 # shellcheck disable=SC2034
     28 read -r resp     # Waiting for input to go back to nnn