]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd_updatedist
Oneiric is too popular, need to adjust stats figure scaling.
[neurodebian.git] / tools / nd_updatedist
index fc2deddca8b49c2cdf007eb33a22e3067195d81a..39d345ecaba8e72b863048c7edf3e804fe54604a 100755 (executable)
@@ -1,6 +1,26 @@
 #!/bin/bash
 
-. /home/cowbuilder/bin/nd_cmdsettings.sh
+if [ $# -eq 1 ]; then
+  family=${1%%-*}
+  dist=${1##*-}
+elif [ $# -ge 2 ]; then
+  family=$1
+  dist=$2
+fi
+
+set -e
+
+if [ -z "$family" ]; then
+  echo "you need to provide a distribution family ('debian', 'ubuntu'); prefix with 'nd+' to enable the neurodebian repository."
+  exit 1
+fi
+
+if [ -z "$dist" ]; then
+  echo "you need to provide a distribution codename (e.g. 'lenny', 'squeeze')."
+  exit 1
+fi
+
+. /etc/neurodebian/cmdsettings.sh "$family" "$dist"
 
 # common options
 opts="--distribution $dist --aptcache $aptcache --buildplace $buildplace"
@@ -13,5 +33,5 @@ fi
 
 for a in $arch; do
   echo "Updating arch $a..."
-  cowbuilder --update --basepath /home/cowbuilder/cow/${family}-${dist}-${a}.cow $opts
+  cowbuilder --update --basepath ${cowbuilderroot}/cow/${family}-${dist}-${a}.cow $opts
 done