From 5816e7afe0d8187b4ffd627689e1aa427a1c1fc8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 19 Jul 2012 02:53:28 +0200 Subject: Moving main executables away from scripts subdirectory. --- Makefile | 4 +-- bin/lb | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ bin/live-build | 39 ++++++++++++++++++++++++++ scripts/build/lb | 73 ------------------------------------------------ scripts/build/live-build | 39 -------------------------- 5 files changed, 114 insertions(+), 114 deletions(-) create mode 100755 bin/lb create mode 100755 bin/live-build delete mode 100755 scripts/build/lb delete mode 100755 scripts/build/live-build diff --git a/Makefile b/Makefile index bd2fc4506..61648874f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SHELL := sh -e LANGUAGES = $(shell cd manpages/po && ls) -SCRIPTS = frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/*/*.sh examples/auto/* scripts/*.sh scripts/*/* share/hooks/* +SCRIPTS = bin/* frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/*/*.sh examples/auto/* scripts/*.sh scripts/*/* share/hooks/* all: build @@ -45,7 +45,7 @@ install: # Installing executables mkdir -p $(DESTDIR)/usr/bin - mv $(DESTDIR)/usr/share/live/build/scripts/build/lb $(DESTDIR)/usr/share/live/build/scripts/build/live-build $(DESTDIR)/usr/bin + cp -a bin/* $(DESTDIR)/usr/bin # Installing documentation mkdir -p $(DESTDIR)/usr/share/doc/live-build diff --git a/bin/lb b/bin/lb new file mode 100755 index 000000000..2f2320308 --- /dev/null +++ b/bin/lb @@ -0,0 +1,73 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2012 Daniel Baumann +## +## 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 +## +## 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 . +## +## 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 diff --git a/scripts/build/lb b/scripts/build/lb deleted file mode 100755 index 2f2320308..000000000 --- a/scripts/build/lb +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2012 Daniel Baumann -## -## 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/scripts/build/live-build b/scripts/build/live-build deleted file mode 100755 index bb8d9620a..000000000 --- a/scripts/build/live-build +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2012 Daniel Baumann -## -## 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 . -## -## 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 -- cgit v1.2.3