no need for mktemp -d flag; shuffle here-doc names

This commit is contained in:
Michael Bradley, Jr 2018-08-08 09:52:43 -05:00
parent 4f098d4fa8
commit 7e85f832d4
1 changed files with 6 additions and 6 deletions

12
run.sh
View File

@ -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