2010-09-02 11:12:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## live-build(7) - System Build Scripts
|
2011-01-11 12:49:49 -01:00
|
|
|
## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org>
|
2010-09-02 11:12:37 +00:00
|
|
|
##
|
|
|
|
## 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.
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Including common functions
|
2010-09-07 13:11:20 +00:00
|
|
|
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
|
2010-09-02 11:12:37 +00:00
|
|
|
|
|
|
|
# Setting static variables
|
|
|
|
DESCRIPTION="$(Echo 'utility to build Debian Live systems')"
|
|
|
|
HELP="FIXME"
|
|
|
|
USAGE="FIXME"
|
|
|
|
|
|
|
|
case "${1}" in
|
|
|
|
-h|--help)
|
|
|
|
if [ -x "$(which man 2>/dev/null)" ]
|
|
|
|
then
|
2011-01-01 15:55:57 -01:00
|
|
|
man lb
|
2010-09-02 11:12:37 +00:00
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
${0} --usage
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
""|-u|--usage)
|
|
|
|
Usage
|
|
|
|
;;
|
|
|
|
|
|
|
|
-v|--version)
|
|
|
|
Version
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2010-09-12 19:01:06 +00:00
|
|
|
COMMAND="lb_${1}"
|
2010-09-02 11:12:37 +00:00
|
|
|
shift
|
|
|
|
|
2010-09-07 13:11:20 +00:00
|
|
|
if [ -x "${LB_BASE}/scripts/build/${COMMAND}" ]
|
2010-09-02 11:12:37 +00:00
|
|
|
then
|
2010-12-13 21:36:01 -01:00
|
|
|
LB=1 exec "${LB_BASE}/scripts/build/${COMMAND}" "${@}"
|
2010-09-02 11:12:37 +00:00
|
|
|
elif [ -x /usr/share/live/build/scripts/build/${COMMAND} ]
|
|
|
|
then
|
2010-12-13 21:36:01 -01:00
|
|
|
LB=1 exec /usr/share/live/build/scripts/build/"${COMMAND}" "${@}"
|
2010-09-02 11:12:37 +00:00
|
|
|
elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
|
|
|
|
then
|
2010-12-13 21:36:01 -01:00
|
|
|
LB=1 exec "${COMMAND}" "${@}"
|
2010-09-02 11:12:37 +00:00
|
|
|
else
|
|
|
|
Echo_error "no such script"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|