File: debian_testing.sh

package info (click to toggle)
cherokee 0.7.2-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,808 kB
  • ctags: 6,577
  • sloc: ansic: 45,071; python: 9,628; sh: 9,468; makefile: 1,639; xml: 61; perl: 32
file content (46 lines) | stat: -rwxr-xr-x 935 bytes parent folder | download | duplicates (3)
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
38
39
40
41
42
43
44
45
46
#!/bin/bash

# NOTICE: This script is Debian dependent.
#

BASE="./compilation_test/"
DISTRO="sid"
REPOSITORY="http://http.us.debian.org/debian"
CHROOT_SCRIPT="debian_testing_chroot.sh"
VERSION="$1"
TARBALL="cherokee-${VERSION}.tar.gz"

# Some basic checks
if test "x$TARBALL" == "x"; then
    echo "Usage:"
    echo "  $0 x.y.z"
    echo "Eg: $0 0.4.28b1"
    exit
fi

if [ ! -f $TARBALL ]; then
    echo "Error: $TARBALL not found"
    exit
fi

# Clean it up
sudo rm -rf $BASE
mkdir -p $BASE

# Install basic system
cd $BASE
sudo /usr/sbin/debootstrap $DISTRO `pwd` $REPOSITORY
cd ..

# Copy the second part of the script and the tarball
cp $CHROOT_SCRIPT $BASE/tmp/
cp $TARBALL $BASE/tmp/
chmod a+rx $BASE/tmp/$CHROOT_SCRIPT

# Chroot in there
sudo /usr/sbin/chroot $BASE /tmp/$CHROOT_SCRIPT $VERSION $DISTRO

# Print notice
total_size=`sudo du -s $BASE`
echo "The $BASE directory is ${total}Kb, maybe you want to remove it.."
echo