Skip to content
Snippets Groups Projects
Commit 21006f28 authored by Ludovico de Nittis's avatar Ludovico de Nittis :palm_tree:
Browse files

Merge branch 'wip/t14481' into 'master'

scout-on-soldier: Implement the search-cwd compat flag

See merge request !65
parents 8eb2fe73 983a286b
No related branches found
No related tags found
1 merge request!65scout-on-soldier: Implement the search-cwd compat flag
Pipeline #16559 passed with warnings
#!/bin/sh
# Copyright 2021 Collabora Ltd.
# SPDX-License-Identifier: MIT
# Implement the search-cwd compatibility flag, by appending
# STEAM_COMPAT_INSTALL_PATH to LD_LIBRARY_PATH if it is not already there;
# then execute arguments.
set -eu
if [ -n "${STEAM_COMPAT_INSTALL_PATH-}" ]; then
case ":${LD_LIBRARY_PATH-}:" in
(*:$STEAM_COMPAT_INSTALL_PATH:*)
;;
(*)
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH:"}${STEAM_COMPAT_INSTALL_PATH}"
export LD_LIBRARY_PATH
;;
esac
fi
exec "$@"
# vi: ts=4 sw=4 expandtab
...@@ -37,7 +37,6 @@ usage () { ...@@ -37,7 +37,6 @@ usage () {
} }
main () { main () {
local error
local getopt_temp="help" local getopt_temp="help"
local ours local ours
local runtime local runtime
...@@ -210,6 +209,17 @@ main () { ...@@ -210,6 +209,17 @@ main () {
# Steam client itself, but let's try keeping 32-bit games consistent # Steam client itself, but let's try keeping 32-bit games consistent
# with 64-bit games. # with 64-bit games.
# If run.sh doesn't apply search-cwd, we will!
# Do this after run.sh, to get the correct precedence with respect
# to the LD_LIBRARY_PATH entries added by run.sh itself.
if [ -n "${STEAM_COMPAT_INSTALL_PATH-}" ] && [ -n "${STEAM_COMPAT_FLAGS-}" ]; then
case ",$STEAM_COMPAT_FLAGS," in
(*,search-cwd,*)
set -- "${here}/apply-search-cwd.sh" "$@"
;;
esac
fi
if [ -n "$saved_ld_preload" ]; then if [ -n "$saved_ld_preload" ]; then
case "$1" in case "$1" in
(*=*) (*=*)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment