new: no output redirection if STDIN is a terminal
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 30 Jun 2022 08:44:25 +0000 (10:44 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 30 Jun 2022 08:44:37 +0000 (10:44 +0200)
script/build

index b3dcb6ffa395895d2a8de3c2ea91746c074c5018..7ef635652407b250595e28a230051b307e2558bb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 #!/bin/bash
 
-exec &>/tmp/website-$(date +%s).log
+[[ -t 0 ]] || exec &>/tmp/website-$(date +%s).log
 
 TARGET=${1:-/srv/www/vhosts/www.exim.org}
 LATEST=`(cd docbook; ls -1dv [0-9].[0-9]* | tail -1)`
 
 TARGET=${1:-/srv/www/vhosts/www.exim.org}
 LATEST=`(cd docbook; ls -1dv [0-9].[0-9]* | tail -1)`