]> git.donarmstrong.com Git - neurodebian.git/commitdiff
NH: little helper to initiate chroots for all supported distros
authorYaroslav Halchenko <debian@onerussian.com>
Thu, 27 Oct 2011 20:30:33 +0000 (16:30 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Thu, 27 Oct 2011 20:30:33 +0000 (16:30 -0400)
tools/nd_adddistall [new file with mode: 0755]

diff --git a/tools/nd_adddistall b/tools/nd_adddistall
new file mode 100755 (executable)
index 0000000..f01fa88
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Little helper to bootstrap all ND chroots as specified in
+# /etc/neurodebian/cmdsettings.sh unless a list provided in command line
+
+. /etc/neurodebian/cmdsettings.sh
+
+[ -z "$@" ] && dists="$allnddists" || dists="$@"
+
+echo "Initiating creation of chroots for $dists"
+
+set -eu
+
+CMD=
+MSGS="SUMMARY:\n"
+for dist in $dists; do
+        if [ -e "$cowbuilderroot/cow/$dist-amd64.cow" ]; then
+                status=exists
+        else
+                $CMD sudo $PWD/nd_adddist ${dist%%-*} ${dist#*-} && status=ok || status=failed
+        fi
+        MSGS+=" $(printf '%-30s\\t%s' $dist $status)\n"
+done
+echo -en $MSGS
+