File: kernel-wedge

package info (click to toggle)
kernel-wedge 2.53%2Blenny3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 624 kB
  • ctags: 10
  • sloc: perl: 319; sh: 258; makefile: 50
file content (21 lines) | stat: -rwxr-xr-x 342 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
LIBDIR=/usr/share/kernel-wedge/commands
usage () {
	echo "Usage: kernel-wedge command options"
	echo "Commands:"
	for file in $LIBDIR/*.txt; do
		echo -n "	"
		head -n 1 $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 "$@"