live-build/helpers/lh

63 lines
1.4 KiB
Plaintext
Raw Normal View History

2008-01-18 07:52:04 -01:00
#!/bin/sh
2007-11-11 12:45:34 -01:00
# live-helper(7) - utility to build Debian Live systems
2008-03-06 14:43:00 -01:00
# Copyright (C) 2006-2008 Daniel Baumann <daniel@debian.org>
2007-11-11 12:45:34 -01:00
#
2007-12-22 07:45:48 -01:00
# This program is free software: you can redistribute it and/or modify
2007-11-11 12:45:34 -01:00
# it under the terms of the GNU General Public License as published by
2007-12-22 07:45:48 -01:00
# the Free Software Foundation, either version 3 of the License, or
2007-11-11 12:45:34 -01:00
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
2007-12-22 07:45:48 -01:00
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2007-11-11 12:45:34 -01:00
#
# On Debian systems, the complete text of the GNU General Public License
2007-12-22 07:45:48 -01:00
# can be found in /usr/share/common-licenses/GPL-3 file.
2007-11-11 12:45:34 -01:00
set -e
# Including common functions
LH_BASE="${LH_BASE:-/usr/share/live-helper}"
for FUNCTION in "${LH_BASE}"/functions/*.sh
do
. "${FUNCTION}"
done
# Setting static variables
DESCRIPTION="utility to build Debian Live systems"
HELP="FIXME"
USAGE="FIXME"
case "${1}" in
-h|--help)
Help
;;
-u|--usage)
Usage
;;
-v|--version)
Version
;;
*)
2008-11-02 09:29:09 -01:00
COMMAND="${1}"
shift
if [ -x "$(which lh_${COMMAND} 2>/dev/null)" ]
2007-11-11 12:45:34 -01:00
then
2008-11-02 09:29:09 -01:00
exec lh_"${COMMAND}" ${@}
2007-11-11 12:45:34 -01:00
else
Echo_error "no such helper"
exit 1
fi
;;
esac