mirror of
https://github.com/libretro/libretro-super
synced 2025-01-13 09:38:57 +00:00
Make sure variables based on $PWD are properly quoted
This fixes https://github.com/libretro/docs/issues/889
This commit is contained in:
parent
f4fc2a5ad1
commit
12ab35b2cc
@ -292,7 +292,7 @@ libretro_build_core() {
|
|||||||
|
|
||||||
if [ -n "${LIBRETRO_LOG_MODULE}" ]; then
|
if [ -n "${LIBRETRO_LOG_MODULE}" ]; then
|
||||||
printf -v log_module "$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_MODULE" "$1"
|
printf -v log_module "$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_MODULE" "$1"
|
||||||
[ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_module
|
[ -z "$LIBRETRO_LOG_APPEND" ] && : > "$log_module"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "core_name=\${libretro_${1}_name:-$1}"
|
eval "core_name=\${libretro_${1}_name:-$1}"
|
||||||
@ -327,13 +327,13 @@ libretro_build_core() {
|
|||||||
lecho "Building ${1}..."
|
lecho "Building ${1}..."
|
||||||
if [ -n "$log_module" ]; then
|
if [ -n "$log_module" ]; then
|
||||||
exec 6>&1
|
exec 6>&1
|
||||||
echo "Building ${1}..." >> $log_module
|
echo "Building ${1}..." >> "$log_module"
|
||||||
|
|
||||||
# TODO: Possibly a shell function for tee?
|
# TODO: Possibly a shell function for tee?
|
||||||
if [[ -n "$LIBRETRO_DEVELOPER" && -n "${cmd_tee:=$(find_tool "tee")}" ]]; then
|
if [[ -n "$LIBRETRO_DEVELOPER" && -n "${cmd_tee:=$(find_tool "tee")}" ]]; then
|
||||||
exec > >($cmd_tee -a $log_module)
|
exec > >($cmd_tee -a "$log_module")
|
||||||
else
|
else
|
||||||
exec > $log_module
|
exec > "$log_module"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -14,4 +14,4 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
platform=ios-arm64 ${BASE_DIR}/libretro-build.sh $@
|
platform=ios-arm64 "${BASE_DIR}/libretro-build.sh" $@
|
||||||
|
@ -14,4 +14,4 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
platform=tvos-arm64 ${BASE_DIR}/libretro-build.sh $@
|
platform=tvos-arm64 "${BASE_DIR}/libretro-build.sh" $@
|
||||||
|
@ -10,13 +10,13 @@ secho() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lecho() {
|
lecho() {
|
||||||
[ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> $log_super
|
[ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> "$log_super"
|
||||||
}
|
}
|
||||||
|
|
||||||
lsecho() {
|
lsecho() {
|
||||||
echo "$@"
|
echo "$@"
|
||||||
[ -n "$log_file_only" ] && echo "$@" >&6
|
[ -n "$log_file_only" ] && echo "$@" >&6
|
||||||
[ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> $log_super
|
[ -n "$LIBRETRO_LOG_SUPER" ] && echo "$@" >> "$log_super"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_cmd() {
|
echo_cmd() {
|
||||||
@ -39,7 +39,7 @@ libretro_log_init() {
|
|||||||
if [ -n "$LIBRETRO_LOG_SUPER" ]; then
|
if [ -n "$LIBRETRO_LOG_SUPER" ]; then
|
||||||
log_super="$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_SUPER"
|
log_super="$LIBRETRO_LOG_DIR/$LIBRETRO_LOG_SUPER"
|
||||||
# Redirecting : avoids dependency on trunc(1)
|
# Redirecting : avoids dependency on trunc(1)
|
||||||
[ -z "$LIBRETRO_LOG_APPEND" ] && : > $log_super
|
[ -z "$LIBRETRO_LOG_APPEND" ] && : > "$log_super"
|
||||||
fi
|
fi
|
||||||
# Module logs are truncated as they're opened in log_module_start
|
# Module logs are truncated as they're opened in log_module_start
|
||||||
}
|
}
|
||||||
@ -52,13 +52,13 @@ log_module_start() {
|
|||||||
exec 6>&1 7>&2
|
exec 6>&1 7>&2
|
||||||
|
|
||||||
# Redirecting : avoids dependency on trunc(1)
|
# 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)
|
# Output to screen and logfile in developer mode (if possible)
|
||||||
if [[ -n "$LIBRETRO_DEVELOPER" && -n "${log_tee:=$(find_tool "tee")}" ]]; then
|
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
|
else
|
||||||
exec >> $log_module 2>&1
|
exec >> "$log_module" 2>&1
|
||||||
log_file_only=1
|
log_file_only=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user