File: debian

package info (click to toggle)
rootstrap 0.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 116 kB
  • ctags: 37
  • sloc: python: 126; makefile: 68; sh: 59
file content (37 lines) | stat: -rw-r--r-- 791 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

DEBCONF_FRONTEND=Noninteractive
export DEBCONF_FRONTEND

if test -n "$exclude"; then
    exclude=`echo $exclude | tr ' ' ,`
    opts="--exclude=$exclude"
fi

if test -n "$include"; then
    include=`echo $include | tr ' ' ,`
    opts="$opts --include=$include"
fi

if test -n "$basedebs"; then
    opts="$opts --unpack-tarball $basedebs"
fi

debootstrap $opts $dist $TARGET $mirror $script

echo "deb $mirror $dist main" > $TARGET/etc/apt/sources.list

rm -f $TARGET/var/lib/apt/lists/debootstrap.*

if test -z "$keepdebs"; then
    rm -f $TARGET/var/cache/apt/archives/*.deb
fi

echo $purge | tr ' ' '\n' | xargs --no-run-if-empty -t \
    dpkg --root=$TARGET --purge


if test -n "$install"; then
    chroot $TARGET apt-get update
    chroot $TARGET apt-get install $install
fi