source: live-build/trunk/fuentes/scripts/build/lb_chroot_install-packages @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
6## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7## This is free software, and you are welcome to redistribute it
8## under certain conditions; see COPYING for details.
9
10
11set -e
12
13# Including common functions
14( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
15
16# Setting static variables
17DESCRIPTION="$(Echo 'install queued packages into chroot')"
18HELP=""
19USAGE="${PROGRAM} [--force]"
20USAGE="${PROGRAM} {install|live} [--force]"
21
22_PASS="${1}"
23shift
24
25Arguments "${@}"
26
27# Reading configuration files
28Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
29Set_defaults
30
31Echo_message "Begin installing packages (${_PASS} pass)..."
32
33# Requiring stage file
34Require_stagefile .build/config .build/bootstrap
35
36# Checking stage file
37Check_stagefile .build/chroot_install-packages.${PASS}
38
39# Checking lock file
40Check_lockfile .lock
41
42# Creating lock file
43Create_lockfile .lock
44
45if [ -e chroot/root/packages.chroot ] && [ -s chroot/root/packages.chroot ]
46then
47        # Restoring cache
48        Restore_cache cache/packages.chroot
49
50        # Installing packages
51        case "${LB_APT}" in
52                apt|apt-get)
53                        Chroot chroot "xargs --arg-file=/root/packages.chroot apt-get ${APT_OPTIONS} install"
54                        ;;
55
56                aptitude)
57                        Chroot chroot "xargs --arg-file=/root/packages.chroot aptitude ${APTITUDE_OPTIONS} install"
58                        ;;
59        esac
60
61        # Tidying up
62        rm -f chroot/root/packages.chroot
63
64        # Saving cache
65        Save_cache cache/packages.chroot
66
67fi
68
69# Creating stage file
70Create_stagefile .build/chroot_install-packages.${_PASS}
Note: See TracBrowser for help on using the repository browser.