diff --git a/libretro-build-common.sh b/libretro-build-common.sh index cbe24739a..88f6714fd 100644 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -292,7 +292,7 @@ libretro_build_core() { if [ -n "${LIBRETRO_LOG_MODULE}" ]; then printf -v log_module "$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_MODULE" "$1" - [ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_module + [ -z "$LIBRETRO_LOG_APPEND" ] && : > "$log_module" fi eval "core_name=\${libretro_${1}_name:-$1}" @@ -327,13 +327,13 @@ libretro_build_core() { lecho "Building ${1}..." if [ -n "$log_module" ]; then exec 6>&1 - echo "Building ${1}..." >> $log_module + echo "Building ${1}..." >> "$log_module" # TODO: Possibly a shell function for tee? if [[ -n "$LIBRETRO_DEVELOPER" && -n "${cmd_tee:=$(find_tool "tee")}" ]]; then - exec > >($cmd_tee -a $log_module) + exec > >($cmd_tee -a "$log_module") else - exec > $log_module + exec > "$log_module" fi fi diff --git a/libretro-build-ios-arm64.sh b/libretro-build-ios-arm64.sh index d72ecd70c..4d1e3ad37 100755 --- a/libretro-build-ios-arm64.sh +++ b/libretro-build-ios-arm64.sh @@ -14,4 +14,4 @@ else fi fi -platform=ios-arm64 ${BASE_DIR}/libretro-build.sh $@ +platform=ios-arm64 "${BASE_DIR}/libretro-build.sh" $@ diff --git a/libretro-build-tvos-arm64.sh b/libretro-build-tvos-arm64.sh index a1fff4ec7..3b95dec50 100755 --- a/libretro-build-tvos-arm64.sh +++ b/libretro-build-tvos-arm64.sh @@ -14,4 +14,4 @@ else fi fi -platform=tvos-arm64 ${BASE_DIR}/libretro-build.sh $@ +platform=tvos-arm64 "${BASE_DIR}/libretro-build.sh" $@ diff --git a/script-modules/log.sh b/script-modules/log.sh index 0b39b394d..1c86fd7d7 100644 --- a/script-modules/log.sh +++ b/script-modules/log.sh @@ -10,13 +10,13 @@ secho() { } lecho() { - [ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> $log_super + [ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> "$log_super" } lsecho() { echo "$@" [ -n "$log_file_only" ] && echo "$@" >&6 - [ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> $log_super + [ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> "$log_super" } echo_cmd() { @@ -39,7 +39,7 @@ libretro_log_init() { if [ -n "$LIBRETRO_LOG_SUPER" ]; then log_super="$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_SUPER" # Redirecting : avoids dependency on trunc(1) - [ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_super + [ -z "$LIBRETRO_LOG_APPEND" ] && : > "$log_super" fi # Module logs are truncated as they're opened in log_module_start } @@ -52,13 +52,13 @@ log_module_start() { exec 6>&1 7>&2 # Redirecting : avoids dependency on trunc(1) - [ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_module + [ -z "$LIBRETRO_LOG_APPEND" ] && : > "$log_module" # Output to screen and logfile in developer mode (if possible) if [[ -n "$LIBRETRO_DEVELOPER" && -n "${log_tee:=$(find_tool "tee")}" ]]; then - exec >> $($log_tee -a $log_module) 2>&1 + exec >> $($log_tee -a "$log_module") 2>&1 else - exec >> $log_module 2>&1 + exec >> "$log_module" 2>&1 log_file_only=1 fi fi