2007-09-23 08:04:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2020-03-11 09:07:21 -01:00
|
|
|
## Copyright (C) 2016-2020 The Debian Live team
|
2015-01-04 18:05:39 -01:00
|
|
|
## Copyright (C) 2006-2015 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 ()
|
|
|
|
{
|
2020-02-20 05:58:11 -01:00
|
|
|
local ARGUMENTS
|
2020-03-06 22:16:26 -01:00
|
|
|
local ERR=0
|
2020-03-11 20:30:58 -01:00
|
|
|
ARGUMENTS="$(getopt --longoptions breakpoints,color,no-color,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")" || ERR=$?
|
2007-09-23 08:04:48 +00:00
|
|
|
|
2020-03-06 22:16:26 -01:00
|
|
|
if [ $ERR -eq 1 ]; then
|
|
|
|
Echo_error "invalid arguments"
|
|
|
|
exit 1
|
|
|
|
elif [ $ERR -ne 0 ]; then
|
|
|
|
Echo_error "getop failure"
|
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
|
|
|
;;
|
|
|
|
|
2019-05-29 11:15:46 +00:00
|
|
|
--color)
|
|
|
|
_COLOR="true"
|
2020-03-13 17:36:26 -01:00
|
|
|
_COLOR_OUT="true"
|
|
|
|
_COLOR_ERR="true"
|
2019-05-29 11:15:46 +00:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
2020-03-11 20:30:58 -01:00
|
|
|
--no-color)
|
|
|
|
_COLOR="false"
|
2020-03-13 17:36:26 -01:00
|
|
|
_COLOR_OUT="false"
|
|
|
|
_COLOR_ERR="false"
|
2020-03-11 20:30:58 -01:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
|
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
|
|
|
|
}
|