diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:16 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:26 +0100 |
commit | c68c0a270832ca340429878ce6a0ab606d435b06 (patch) | |
tree | 8f9a4286b138ca2768a724594ad4219bf30f6167 /functions/package.sh | |
parent | f314791fa2fa3e6a557ca50ecb4a0cf7798fee79 (diff) | |
download | vyos-live-build-c68c0a270832ca340429878ce6a0ab606d435b06.tar.gz vyos-live-build-c68c0a270832ca340429878ce6a0ab606d435b06.zip |
Adding live-helper 1.0~a21-1.
Diffstat (limited to 'functions/package.sh')
-rwxr-xr-x | functions/package.sh | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/functions/package.sh b/functions/package.sh deleted file mode 100755 index 96316dcc2..000000000 --- a/functions/package.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -# packages.sh - handle packages installation -# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org> -# -# live-helper 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 - -Check_package () -{ - ITEM="${1}" - PACKAGE="${2}" - - case "${LIVE_CHROOT_BUILD}" in - enabled) - if [ ! -d "${ITEM}" ] && [ ! -f "${ITEM}" ] - then - PACKAGES="${PACKAGES} ${PACKAGE}" - fi - ;; - - disabled) - ITEM="`echo ${ITEM} | sed -e 's/chroot//'`" - - if [ ! -d "${ITEM}" ] && [ ! -f "${ITEM}" ] - then - Echo_error "You need to install ${PACKAGE} on your host system." - exit 1 - fi - ;; - esac -} - -Install_package () -{ - if [ -n "${PACKAGES}" ] && [ "${LIVE_CHROOT_BUILD}" != "disabled" ] - then - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get install --yes ${PACKAGES}" - ;; - - aptitude) - Chroot "aptitude install --assume-yes ${PACKAGES}" - ;; - esac - fi -} - -Remove_package () -{ - if [ -n "${PACKAGES}" ] && [ "${LIVE_CHROOT_BUILD}" != "disabled" ] - then - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get remove --purge --yes ${PACKAGES}" - ;; - - aptitude) - Chroot "aptitude purge --assume-yes ${PACKAGES}" - ;; - esac - fi -} |