More verbose setup-all-dchroots when run in a terminal
authorPeter Palfrader <peter@palfrader.org>
Wed, 30 May 2018 08:00:54 +0000 (10:00 +0200)
committerPeter Palfrader <peter@palfrader.org>
Wed, 30 May 2018 08:00:54 +0000 (10:00 +0200)
modules/schroot/files/setup-all-dchroots

index 4de0f83..42e3a29 100755 (executable)
@@ -41,6 +41,12 @@ else
     MODE=porterbox
 fi
 
+if [ -t 0 ] ; then
+    SILENT=""
+else
+    SILENT="chronic"
+fi
+
 get_suites() {
     case "$1" in
       amd64|i386|armel|armhf)
@@ -96,13 +102,13 @@ do_one() {
     case "$MODE" in
         buildd)
             mkdir -p /srv/buildd/unpack
-            if ! chronic setup-dchroot -f -a "$a" $extra -D -d '/srv/buildd/unpack' -K "$s"
+            if ! $SILENT setup-dchroot -f -a "$a" $extra -D -d '/srv/buildd/unpack' -K "$s"
             then
                 return 1
             fi
             ;;
         porterbox)
-            if ! chronic setup-dchroot -f -a "$a" $extra "$s"
+            if ! $SILENT setup-dchroot -f -a "$a" $extra "$s"
             then
                 return 1
             fi