root/cherokee/trunk/debian_testing.sh

Revision 59, 0.9 kB (checked in by alo, 3 years ago)

--

  • Property svn:executable set to *
Line 
1 #!/bin/bash
2
3 # NOTICE: This script is Debian dependent.
4 #
5
6 BASE="./compilation_test/"
7 DISTRO="sid"
8 REPOSITORY="http://http.us.debian.org/debian"
9 CHROOT_SCRIPT="debian_testing_chroot.sh"
10 VERSION="$1"
11 TARBALL="cherokee-${VERSION}.tar.gz"
12
13 # Some basic checks
14 if test "x$TARBALL" == "x"; then
15     echo "Usage:"
16     echo "  $0 x.y.z"
17     echo "Eg: $0 0.4.28b1"
18     exit
19 fi
20
21 if [ ! -f $TARBALL ]; then
22     echo "Error: $TARBALL not found"
23     exit
24 fi
25
26 # Clean it up
27 sudo rm -rf $BASE
28 mkdir -p $BASE
29
30 # Install basic system
31 cd $BASE
32 sudo /usr/sbin/debootstrap $DISTRO `pwd` $REPOSITORY
33 cd ..
34
35 # Copy the second part of the script and the tarball
36 cp $CHROOT_SCRIPT $BASE/tmp/
37 cp $TARBALL $BASE/tmp/
38 chmod a+rx $BASE/tmp/$CHROOT_SCRIPT
39
40 # Chroot in there
41 sudo /usr/sbin/chroot $BASE /tmp/$CHROOT_SCRIPT $VERSION $DISTRO
42
43 # Print notice
44 total_size=`sudo du -s $BASE`
45 echo "The $BASE directory is ${total}Kb, maybe you want to remove it.."
46 echo
Note: See TracBrowser for help on using the browser.