summaryrefslogtreecommitdiffstats
path: root/utils/semodule-utils/test.sh
blob: b23fb15571b4074a443b085502ef35bfde0e575a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

case "$1" in
semodule-expand|semodule-link|semodule-package|semodule-unpackage)
	# All semodule tools print usage to stderr and exit non-zero with no args.
	# Just verify they are present and executable.
	tool="semodule_${1#semodule-}"
	if ! command -v "$tool" > /dev/null 2>&1; then
		echo "ERROR: $tool not found"
		exit 1
	fi
	echo "$1 OK"
	;;
*)
	exit 0
	;;
esac