File: kernel-wedge

package info (click to toggle)
kernel-wedge 2.102
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 380 kB
  • sloc: perl: 570; sh: 262; makefile: 21
file content (20 lines) | stat: -rwxr-xr-x 337 bytes parent folder | download | duplicates (2)
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 "$@"