- usage() {
- echo "usage: keyed-gpg /path/to/keyfile1.asc ... -- gpg-command..." >&2
- exit 1
- }
-
- incomplete=true
- keyfiles=()
- while (( $# > 0 ));do
- if [[ "$1" == -- ]];then
- shift
- incomplete=false
- break
- fi
- if [[ ! -r "$1" ]];then
- usage
- fi
- keyfiles+=$1
- shift
- done
- if "$incomplete";then
- usage
- fi
-