Skip to content
Snippets Groups Projects
Commit 0f7ba2cb authored by Simon McVittie's avatar Simon McVittie
Browse files

_v2-entry-point: Use pv-wrap --ld-preloads instead of splitting LD_PRELOAD


This is a prerequisite for converting this script to /bin/sh, because
this sort of argument vector manipulation would be difficult to
do while preserving relative order without access to more than one
array.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent c01d4dba
No related branches found
No related tags found
1 merge request!530Avoid #!/usr/bin/env bash scripts
...@@ -17,13 +17,12 @@ log_to_file= ...@@ -17,13 +17,12 @@ log_to_file=
log_dir=${STEAM_LINUX_RUNTIME_LOG_DIR-"${PRESSURE_VESSEL_VARIABLE_DIR-"${here}/var"}"} log_dir=${STEAM_LINUX_RUNTIME_LOG_DIR-"${PRESSURE_VESSEL_VARIABLE_DIR-"${here}/var"}"}
keep_logs= keep_logs=
use_timestamp= use_timestamp=
ld_preload=
# Arguments for pressure-vessel-wrap # Arguments for pressure-vessel-wrap
declare -a container_args=() declare -a container_args=()
if [ -n "${LD_PRELOAD-}" ]; then if [ -n "${LD_PRELOAD-}" ]; then
container_args+=("--env-if-host=LD_PRELOAD=$LD_PRELOAD") container_args+=("--env-if-host=LD_PRELOAD=$LD_PRELOAD")
ld_preload="$LD_PRELOAD" container_args+=("--ld-preloads="$LD_PRELOAD")
fi fi
unset LD_PRELOAD unset LD_PRELOAD
...@@ -268,15 +267,6 @@ case "${STEAM_RUNTIME-}" in ...@@ -268,15 +267,6 @@ case "${STEAM_RUNTIME-}" in
;; ;;
esac esac
old_IFS="$IFS"
IFS=": "
for word in $ld_preload; do
if [ -n "$word" ]; then
container_args+=("--ld-preload=$word")
fi
done
IFS="$old_IFS"
if [ -x "$here/pressure-vessel/bin/steam-runtime-launcher-interface-0" ]; then if [ -x "$here/pressure-vessel/bin/steam-runtime-launcher-interface-0" ]; then
set -- \ set -- \
"$here/pressure-vessel/bin/steam-runtime-launcher-interface-0" \ "$here/pressure-vessel/bin/steam-runtime-launcher-interface-0" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment