live-build/functions/usage.sh

32 lines
667 B
Bash
Raw Normal View History

2007-09-23 08:04:47 +00:00
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
2007-09-23 08:04:48 +00:00
2007-09-23 08:04:47 +00:00
Usage ()
{
printf "%s - %s\n" "${PROGRAM}" "${DESCRIPTION}"
2007-09-23 08:04:47 +00:00
echo
2008-08-14 19:46:19 +00:00
Echo "Usage:"
2007-09-23 08:04:48 +00:00
echo
if [ -n "${USAGE}" ]
then
Echo " ${USAGE}"
2007-09-23 08:04:48 +00:00
echo
fi
2009-01-15 12:24:40 -01:00
printf " %s [-h|--help]\n" "${PROGRAM}"
printf " %s [-u|--usage]\n" "${PROGRAM}"
printf " %s [-v|--version]\n" "${PROGRAM}"
2007-09-23 08:04:47 +00:00
echo
Echo "Try \"%s --help\" for more information." "${PROGRAM}"
2007-09-23 08:04:48 +00:00
2007-09-23 08:04:47 +00:00
exit 1
}