~ppa-smoketest-dev/ppa-smoketest/trunk

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
#! /bin/zsh -ex

# https://edge.launchpad.net/ppa-smoketest
# Copyright (C) 2009 Canonical Ltd

SCHROOT='karmic-ppa-test'
PPAS='http://ppa.launchpad.net/bzr/ppa/ubuntu'
KEYS="CBEDE690576D1E4E813F6BB3EBAF723D37B19B80 ECE2800BACF028B31EE3657CD702BF6B8C6C1EFD"

PACKAGES='bzr bzr-svn bzrtools bzr-gtk qbzr'

# build up a shell script with everything to do; pipe it in 
# through stdin to the chroot
# nb all of this gets one level of variable expansion by the 
# outside shell script

cat <<EOF | schroot -c $SCHROOT -u root -- sh -ex
    for ppa in $PPAS
    do
	echo deb \$ppa karmic main
    done > /etc/apt/sources.list.d/ppa-smoketest.list

    for key in $KEYS 
    do
        gpg --keyserver keyserver.ubuntu.com --recv-key \$key 
        gpg --export \$key | apt-key add -
    done

    apt-get update

    apt-get install $PACKAGES
EOF


# vim: sw=4