2007-09-23 08:04:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2014-02-08 15:47:02 -01:00
|
|
|
## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch>
|
2010-09-02 11:12:37 +00:00
|
|
|
##
|
2012-07-29 23:59:00 +00:00
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
2010-09-02 11:12:37 +00:00
|
|
|
## 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
|
|
|
|
|
|
|
Arguments ()
|
|
|
|
{
|
2007-09-24 06:47:42 +00:00
|
|
|
ARGUMENTS="$(getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")"
|
2007-09-23 08:04:48 +00:00
|
|
|
|
|
|
|
if [ "${?}" != "0" ]
|
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
Echo_error "terminating" >&2
|
2007-09-23 08:04:48 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
eval set -- "${ARGUMENTS}"
|
|
|
|
|
|
|
|
while true
|
|
|
|
do
|
|
|
|
case "${1}" in
|
2007-09-23 08:04:49 +00:00
|
|
|
--breakpoints)
|
2009-12-13 19:17:45 -01:00
|
|
|
_BREAKPOINTS="true"
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
2007-10-18 20:17:04 +00:00
|
|
|
-c|--conffile)
|
2008-11-02 15:22:56 -01:00
|
|
|
_CONFFILE="${2}"
|
2007-09-23 08:05:17 +00:00
|
|
|
shift 2
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--debug)
|
2009-12-13 19:17:45 -01:00
|
|
|
_DEBUG="true"
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--force)
|
2009-12-13 19:17:45 -01:00
|
|
|
_FORCE="true"
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
-h|--help)
|
2009-01-30 16:16:59 -01:00
|
|
|
Man
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
2007-09-23 08:04:51 +00:00
|
|
|
;;
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
--quiet)
|
2009-12-13 19:17:45 -01:00
|
|
|
_QUIET="true"
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
-u|--usage)
|
2007-09-23 08:05:17 +00:00
|
|
|
Usage
|
|
|
|
shift
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--verbose)
|
2009-12-13 19:17:45 -01:00
|
|
|
_VERBOSE="true"
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
-v|--version)
|
2012-07-18 19:38:58 +00:00
|
|
|
echo "${VERSION}"
|
|
|
|
exit 0
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--)
|
2007-09-23 08:05:17 +00:00
|
|
|
shift
|
|
|
|
break
|
2007-09-23 08:04:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2008-08-11 20:28:54 +00:00
|
|
|
Echo_error "internal error %s" "${0}"
|
2007-09-23 08:04:48 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|