aboutsummaryrefslogtreecommitdiff
path: root/plugins/tpm/scripts/helpers/utility.sh
blob: de6eb35f554c5d7b1da8aa2ef6147941f92da48a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ensure_tpm_path_exists() {
	mkdir -p "$(tpm_path)"
}

fail_helper() {
	local message="$1"
	echo "$message" >&2
	FAIL="true"
}

exit_value_helper() {
	if [ "$FAIL" == "true" ]; then
		exit 1
	else
		exit 0
	fi
}