File: install-all

package info (click to toggle)
rinse 1.7-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 280 kB
  • ctags: 34
  • sloc: perl: 873; sh: 762; makefile: 112
file content (73 lines) | stat: -rwxr-xr-x 1,193 bytes parent folder | download | duplicates (7)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
#
#  Attempt to install each distribution into a static location
# so that we can test it worked as expected.
#
#  This is not run automatically because detection of success is
# hard - and it would take a very very long time to complete.
#
# Steve
# --
#


#
#  Prefix to install into.
# 
prefix=/tmp/f/b


#
#  We must be root to run the script.
#
if [ "$UID" != "0" ]; then
    echo "You must be root to run this script"
    exit
fi


#
#  Make sure the prefix exists.
#
if [ ! -d "$prefix" ]; then
    echo "Prefix not found: $prefix"
    exit
fi

#
#  Save our start time
#
start=$(date)

#
#  Try all distributions
#
for i in $(rinse --list-distributions | grep -- - ); do

    #
    # Try all archs.
    #
    for j in i386 amd64 ; do

        #
        #  Clean old any previous run
        #
        if [ -d $prefix/$i.$j ]; then
            rm -rf $prefix/$i.$j
        fi

        #
        #  Install now, keeping a logfile of any activity.
        #
        rinse --directory=$prefix/$i.$j --distribution=$i --arch=$j | tee $prefix/$i.$j.log

    done

done


#
#  Report on the time taken to perform the installations.
#
echo "Started: ${start}"
echo "Finished: `date`"