summaryrefslogtreecommitdiffstats
path: root/kernel-wedge
blob: 24cd2f5abf06bcba294d571b7975a144537b0d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
LIBDIR=/usr/share/kernel-wedge/commands
usage () {
	echo "Usage: kernel-wedge command options"
	echo "Commands:"
	for file in $LIBDIR/*; do
		printf "	%s\n" "${file##*/}"
	done
	exit 1
}
set -e
command=$1
if [ -z "$command" ]; then
	usage
fi
if [ ! -x "$LIBDIR/$command" ]; then
	usage
fi
shift 1 || true
$LIBDIR/$command "$@"