Jelajahi Sumber

Support non-tty mode in push.sh

Tianon Gravi 10 tahun lalu
induk
melakukan
026292f5a9
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      push.sh

+ 2 - 1
push.sh

@@ -5,4 +5,5 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 #docker pull $(awk '$1 == "FROM" { print $2 }' Dockerfile)
 docker build -t docker-library-docs .
-docker run -it --rm -v "$(pwd)":/wtf -w /wtf -e TERM --entrypoint 'bash' docker-library-docs -c './push.pl "$@"' -- "$@"
+test -t 1 && it='-it' || it='-i'
+docker run "$it" --rm -v "$(pwd)":/wtf -w /wtf -e TERM --entrypoint 'bash' docker-library-docs -c './push.pl "$@"' -- "$@"