#!/bin/sh
LIBDIR=/usr/share/kernel-wedge/commands
set -e
command=$1
if [ -z "$command" ]; then
	kernel-wedge
fi
if [ ! -x "$LIBDIR/$command" ]; then
	echo "No such command."
	exit 1
fi
if [ ! -e $LIBDIR/$command.txt ]; then
	echo "Undocumented command."
	exit
fi
cat $LIBDIR/$command.txt
