File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,18 @@ elif [[ "$1" == --cross-compile-win* ]]; then
4545 exit 1
4646 fi
4747
48+ dockerflags=" " ;
49+ # Use |-it| to run docker to support Ctrl-C if we run the script inside interactive terminal.
50+ # Otherwise (e.g. cronjob) - do nothing.
51+ if [[ -t 0 ]]; then
52+ dockerflags=" -it"
53+ fi
54+
4855 if [[ " $1 " == " --cross-compile-win32" ]]; then
49- time docker run --init --rm -v" ${PWD} " :/host -it ubuntu:18.04 bash /host/crosscompile-from-linux-to-win.sh --win32 /host/output/ffmpeg-win32.exe
56+ time docker run --init --rm -v" ${PWD} " :/host ${dockerflags} ubuntu:18.04 bash /host/crosscompile-from-linux-to-win.sh --win32 /host/output/ffmpeg-win32.exe
5057 cd output && zip ffmpeg.zip ffmpeg-win32.exe
5158 elif [[ " $1 " == " --cross-compile-win64" ]]; then
52- time docker run --init --rm -v" ${PWD} " :/host -it ubuntu:18.04 bash /host/crosscompile-from-linux-to-win.sh --win64 /host/output/ffmpeg-win64.exe
59+ time docker run --init --rm -v" ${PWD} " :/host ${dockerflags} ubuntu:18.04 bash /host/crosscompile-from-linux-to-win.sh --win64 /host/output/ffmpeg-win64.exe
5360 cd output && zip ffmpeg.zip ffmpeg-win64.exe
5461 else
5562 echo " ERROR: unsupported platform - $1 "
You can’t perform that action at this time.
0 commit comments