summaryrefslogtreecommitdiff
path: root/gcr/tests/files/gnupg-mock/mock-with-homedir
blob: c537e03aa4b74f9d85b65ed2512fe3efa5499280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# This script is used with test-gnupg-process
set -euf

HOMEDIR=

# Not real 'long' option parsing, but good enough for this
while [ $# -gt 1 ]; do
	if [ "$1" = --homedir ]; then
		HOMEDIR=$2
		shift
	fi
	shift
done

# No homedir passed :(
if [ -z "$HOMEDIR" ]; then
	exit 22
fi

echo "DIR: $HOMEDIR"