#!/usr/bin/env bash TEMP=$(getopt -o hvdsea: --long help,verbose,debug,signature,encryption,authentication \ -n 'javawrap' -- "$@") if [ $? != 0 ]; then echo "Terminating..." >&2 exit 1 fi eval set -- "$TEMP" usage() { cat <$temp/test.txt result="$(gpg --output $temp/test.gpg -e $temp/test.txt 2>&1 && gpg --output $temp/test.out -d $temp/test.txt.gpg 2>&1)" grep '42' $temp/test.out 2>&1 print_result result fi if [[ $ALL -eq "true" || $AUTHENTICATION -eq "true" ]]; then echo "Testing authentication key..." result="$(ssh-add -l)" print_result result fi