no need for mktemp -d flag; shuffle here-doc names
This commit is contained in:
parent
4f098d4fa8
commit
7e85f832d4
12
run.sh
12
run.sh
|
@ -143,16 +143,16 @@ run_embark () {
|
||||||
local run_script=$(< "$EMBARK_DOCKER_RUN")
|
local run_script=$(< "$EMBARK_DOCKER_RUN")
|
||||||
# do not alter indentation, tabs in lines below
|
# do not alter indentation, tabs in lines below
|
||||||
run_script=$(cat <<- RUN_SCRIPT
|
run_script=$(cat <<- RUN_SCRIPT
|
||||||
exec bash -${i_flag}s \$(tty) ${cmd[@]} << 'SCRIPT'
|
exec bash -${i_flag}s \$(tty) ${cmd[@]} << 'RUN'
|
||||||
__tty=\$1
|
__tty=\$1
|
||||||
shift
|
shift
|
||||||
td=\$(mktemp -d)
|
script=\$(mktemp)
|
||||||
cat << 'RUN' > \$td/run_script
|
cat << 'SCRIPT' > \$script
|
||||||
$run_script
|
$run_script
|
||||||
RUN
|
|
||||||
chmod +x \$td/run_script
|
|
||||||
exec \$td/run_script \$@ < \$__tty
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
chmod +x \$script
|
||||||
|
exec \$script \$@ < \$__tty
|
||||||
|
RUN
|
||||||
RUN_SCRIPT
|
RUN_SCRIPT
|
||||||
)
|
)
|
||||||
# do not alter indentation, tabs in lines above
|
# do not alter indentation, tabs in lines above
|
||||||
|
|
Loading…
Reference in New Issue