Merge pull request #1780 from warmenhoven/warmenhoven/pr/docs-889

Make sure variables based on $PWD are properly quoted
This commit is contained in:
Ömercan Kömür 2024-01-09 19:59:57 +03:00 committed by GitHub
commit d3486e9c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

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

View File

@ -14,4 +14,4 @@ else
fi
fi
platform=ios-arm64 ${BASE_DIR}/libretro-build.sh $@
platform=ios-arm64 "${BASE_DIR}/libretro-build.sh" $@

View File

@ -14,4 +14,4 @@ else
fi
fi
platform=tvos-arm64 ${BASE_DIR}/libretro-build.sh $@
platform=tvos-arm64 "${BASE_DIR}/libretro-build.sh" $@

View File

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