]> git.donarmstrong.com Git - neurodebian.git/blob - tools/nd_updatedist
Also for stats report which repo and which job number use our setup
[neurodebian.git] / tools / nd_updatedist
1 #!/bin/bash
2
3 if [ $# -eq 1 ]; then
4   family=${1%%-*}
5   dist=${1##*-}
6 elif [ $# -ge 2 ]; then
7   family=$1
8   dist=$2
9 fi
10
11 set -e
12
13 if [ -z "$family" ]; then
14   echo "you need to provide a distribution family ('debian', 'ubuntu'); prefix with 'nd+' to enable the neurodebian repository."
15   exit 1
16 fi
17
18 if [ -z "$dist" ]; then
19   echo "you need to provide a distribution codename (e.g. 'lenny', 'squeeze')."
20   exit 1
21 fi
22
23 . /etc/neurodebian/cmdsettings.sh "$family" "$dist"
24
25 # common options
26 opts="--distribution $dist --aptcache $aptcache --buildplace $buildplace"
27
28 if [ -n "$3" ]; then
29   arch=$3
30 else
31   arch="i386 amd64"
32 fi
33
34 for a in $arch; do
35   echo "Updating arch $a..."
36   cowbuilder --update --basepath ${cowbuilderroot}/cow/${family}-${dist}-${a}.cow $opts
37 done