Skip to content
Snippets Groups Projects
Commit 43b6f7b0 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

Merge branch 'wip/smcv/scout-on-soldier' into 'master'

Fixes for layered scout-on-soldier

See merge request !48
parents 2f86aad9 e06c6854
No related branches found
No related tags found
1 merge request!48Fixes for layered scout-on-soldier
Pipeline #13676 passed
...@@ -37,10 +37,18 @@ usage () { ...@@ -37,10 +37,18 @@ usage () {
} }
main () { main () {
local error
local getopt_temp="help" local getopt_temp="help"
local runtime local runtime
local src local src
local verbose=
if [ "${STEAM_LINUX_RUNTIME_VERBOSE-}" = 1 ]; then
verbose=yes
fi
getopt_temp="$getopt_temp,verb:"
getopt_temp="$getopt_temp,verbose"
getopt_temp="$(getopt -o '' --long "$getopt_temp" -n "$me" -- "$@")" getopt_temp="$(getopt -o '' --long "$getopt_temp" -n "$me" -- "$@")"
eval "set -- $getopt_temp" eval "set -- $getopt_temp"
unset getopt_temp unset getopt_temp
...@@ -60,6 +68,12 @@ main () { ...@@ -60,6 +68,12 @@ main () {
log "Ignoring unknown Steam compatibility interface verb: $2" log "Ignoring unknown Steam compatibility interface verb: $2"
;; ;;
esac esac
shift 2
;;
(--verbose)
verbose=yes
shift
;; ;;
(--) (--)
...@@ -93,6 +107,8 @@ main () { ...@@ -93,6 +107,8 @@ main () {
mv -f "${here}/var/.slr-latest.log.$$" "${here}/var/slr-latest.log" mv -f "${here}/var/.slr-latest.log.$$" "${here}/var/slr-latest.log"
fi fi
[ -z "$verbose" ] || log "Command to run: $(printf '%q ' "$@")"
# Just because zenity was available on the host system doesn't mean # Just because zenity was available on the host system doesn't mean
# it's available in this container (soldier doesn't currently have it) # it's available in this container (soldier doesn't currently have it)
unset STEAM_ZENITY unset STEAM_ZENITY
...@@ -114,8 +130,16 @@ main () { ...@@ -114,8 +130,16 @@ main () {
ln -fns "$src/usr" "$runtime/" ln -fns "$src/usr" "$runtime/"
fi fi
[ -z "$verbose" ] || log "$runtime/setup.sh..."
# Make sure pinning is up to date # Make sure pinning is up to date
"$runtime/setup.sh" if "$runtime/setup.sh" > /dev/null; then
: # OK
else
error="$?"
log "Error: setup.sh failed with exit status $error"
exit "$error"
fi
if [ -n "$saved_ld_preload" ]; then if [ -n "$saved_ld_preload" ]; then
case "$1" in case "$1" in
...@@ -129,10 +153,9 @@ main () { ...@@ -129,10 +153,9 @@ main () {
set -- env LD_PRELOAD="$saved_ld_preload" "$@" set -- env LD_PRELOAD="$saved_ld_preload" "$@"
fi fi
[ -z "$verbose" ] || log "Running: $runtime/run.sh $(printf '%q ' "$@")"
exec "$runtime/run.sh" "$@" exec "$runtime/run.sh" "$@"
# This should never be reached # This should never be reached
log "Internal error: exec failed"
exit 1 exit 1
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment