File: nd_adddistall

package info (click to toggle)
neurodebian 0.43.0
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,960 kB
  • sloc: sh: 2,419; python: 1,978; perl: 412; makefile: 207; javascript: 63
file content (24 lines) | stat: -rwxr-xr-x 617 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
#!/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="$alldists" || 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 nd_adddist ${dist%%-*} ${dist#*-} && status=ok || status=failed
        fi
        MSGS+=" $(printf '%-30s\\t%s' $dist $status)\n"
done
echo -en $MSGS