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