File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ git_patches="$(get_applied_git_patches)"
3636run_cmd=" $CFG_ENV_RUNTIME gdb -ex='handle SIGPIPE nostop noprint pass' -ex=run --args ./\" $CFG_BIN \" \" exec autoexec.cfg;logfile $logfile ;#sid:$SERVER_UUID \" "
3737log " $run_cmd "
3838launch_commit=" $( get_commit) "
39- eval " $run_cmd "
39+ bash -c " set -euo pipefail; $run_cmd "
4040log " build commit: $launch_commit "
4141if [ " $git_patches " != " " ]
4242then
Original file line number Diff line number Diff line change 105105 figlet " $d "
106106 echo -e " navigating to: \\ 033[1m$( pwd) \\ 033[0m"
107107 echo -e " executing: \\ 033[1m$shell_command \\ 033[0m"
108- eval " $shell_command " || handle_error
108+ bash -c " set -euo pipefail; $shell_command " || handle_error
109109 )
110110done
111111
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function bam_update_teeworlds() {
4848
4949 apply_git_patches
5050 local build_cmd=" $CFG_BAM_BIN ${arg_bam_flags[*]} "
51- eval " $build_cmd " || \
51+ bash -c " set -euo pipefail; $build_cmd " || \
5252 { err --log " build failed (bam)" ; }
5353 reverse_git_patches
5454
Original file line number Diff line number Diff line change @@ -203,8 +203,8 @@ function cmake_update() {
203203 local build_fail=0
204204 local build_cmd=" $CFG_ENV_BUILD cmake .. ${arg_cmake_flags[*]} "
205205 log " $( tput bold) $build_cmd $( tput sgr0) "
206- eval " $build_cmd " || \
207- { err --log " build failed at $branch $bin_commit (cmake)" ; build_fail=1; }
206+ bash -c " set -euo pipefail; $build_cmd " || \
207+ { err --log " build failed at $branch $bin_commit (cmake)" ; err " build directory: $PWD " ; build_fail=1; }
208208 if [ " $build_fail " == " 0" ]
209209 then
210210 make " -j$( get_cores) " || { err --log " build failed at $branch $( git rev-parse HEAD) (make)" ; build_fail=1; }
Original file line number Diff line number Diff line change @@ -26,8 +26,10 @@ def_var 'CFG_GIT_BRANCH' 'git_branch' "" ''
2626def_var ' CFG_SERVER_TYPE' ' server_type' " teeworlds" ' (tem|teeworlds)'
2727def_var ' CFG_TEM_SETTINGS' ' tem_settings' " tem.settings" ' '
2828def_var ' CFG_TEM_PATH' ' tem_path' " /home/$USER /git/TeeworldsEconMod" ' '
29- def_var ' CFG_ENV_BUILD' ' env_build' " source ./lib/env_san.sh;" ' (.*=.*|.*;$|)'
30- def_var ' CFG_ENV_RUNTIME' ' env_runtime' " source ./lib/env_san.sh;" ' (.*=.*|.*;$|)'
29+ # shellcheck disable=SC2016
30+ def_var ' CFG_ENV_BUILD' ' env_build' ' source $SCRIPT_ROOT/lib/env_san.sh;' ' (.*=.*|.*;$|)'
31+ # shellcheck disable=SC2016
32+ def_var ' CFG_ENV_RUNTIME' ' env_runtime' ' source $SCRIPT_ROOT/lib/env_san.sh;' ' (.*=.*|.*;$|)'
3133def_var ' CFG_LOG_EXT' ' logfile_extension' " .log" ' '
3234def_var ' CFG_AUTO_CLEANUP_OLD_LOCAL_DATA' ' auto_cleanup_old_local_data' " 0" ' (0|no|off|false|1|yes|on|true)'
3335def_var ' CFG_GITPATH_ANTIBOT' ' gitpath_antibot' " " ' '
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ else # teeworlds
127127 tput bold
128128 echo " $run_cmd "
129129 tput sgr0
130- eval " $run_cmd "
130+ bash -c " set -euo pipefail; $run_cmd "
131131
132132 if [ " $arg_logs " == " 1" ] && [ " $arg_is_interactive " == " 0" ]
133133 then
You can’t perform that action at this time.
0 commit comments