Debian Codegraph @

gcr/fixtures/gnupg-mock/mock-with-homedir

raw
1 #!/bin/sh
2
3 # This script is used with test-gnupg-process
4 set -euf
5
6 HOMEDIR=
7
8 # Not real 'long' option parsing, but good enough for this
9 while [ $# -gt 1 ]; do
10 if [ "$1" = --homedir ]; then
11 HOMEDIR=$2
12 shift
13 fi
14 shift
15 done
16
17 # No homedir passed :(
18 if [ -z "$HOMEDIR" ]; then
19 exit 22
20 fi
21
22 echo "DIR: $HOMEDIR"