diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-19 02:53:28 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-19 02:53:28 +0200 |
commit | 5816e7afe0d8187b4ffd627689e1aa427a1c1fc8 (patch) | |
tree | 33dabd43efc6f784d71684e72f3f68ef36fced03 /bin | |
parent | ad4a519ccc6596d4f02070c4b451e8f8ce235b27 (diff) | |
download | vyos-live-build-5816e7afe0d8187b4ffd627689e1aa427a1c1fc8.tar.gz vyos-live-build-5816e7afe0d8187b4ffd627689e1aa427a1c1fc8.zip |
Moving main executables away from scripts subdirectory.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/lb | 73 | ||||
-rwxr-xr-x | bin/live-build | 39 |
2 files changed, 112 insertions, 0 deletions
@@ -0,0 +1,73 @@ +#!/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. + + +set -e + +# Including common functions +. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh + +# 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 + man lb + exit 0 + else + ${0} --usage + exit 0 + fi + ;; + + ""|-u|--usage) + Usage + ;; + + -v|--version) + echo "${VERSION}" + exit 0 + ;; + + *) + COMMAND="lb_${1}" + shift + + ENV="" + + for _FILE in config/environment config/environment.binary + do + if [ -e "${_FILE}" ] + then + ENV="${ENV} $(grep -v '^#' ${_FILE})" + fi + done + + if [ -x "${LB_BASE}/scripts/build/${COMMAND}" ] + then + SCRIPT="${LB_BASE}/scripts/build/${COMMAND}" + elif [ -x /usr/share/live/build/scripts/build/${COMMAND} ] + then + SCRIPT=/usr/share/live/build/scripts/build/"${COMMAND}" + elif [ -x "$(which ${COMMAND} 2>/dev/null)" ] + then + SCRIPT="${COMMAND}" + else + Echo_error "no such script: ${COMMAND}" + exit 1 + fi + + Echo "[%s] %s" "$(date +'%F %T')" "${COMMAND} ${*}" + LB=1 ${ENV} exec "${SCRIPT}" "${@}" + ;; +esac diff --git a/bin/live-build b/bin/live-build new file mode 100755 index 000000000..bb8d9620a --- /dev/null +++ b/bin/live-build @@ -0,0 +1,39 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (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 +## along with this program. If not, see <http://www.gnu.org/licenses/>. +## +## The complete text of the GNU General Public License +## can be found in /usr/share/common-licenses/GPL-3 file. + + +set -e + +# Including common functions +. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh + +if [ -x "$(which man 2>/dev/null)" ] +then + man live-build + exit 0 +else + Echo "live-build is a set of scripts to build Debian Live system images." + echo + Echo "The idea behind live-build is a framework that uses a configuration directory to completely automate and customize all aspects of building a Live image." + echo + Echo "An introduction to live-build can be found in the live-build(7) manpage." + exit 0 +fi |