diff options
author | Matt Turner <mattst88@gmail.com> | 2023-05-18 13:37:36 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2023-05-18 13:41:21 -0400 |
commit | 3fc4f50fd7d2d1c349907e34e7337c4449bbf384 (patch) | |
tree | 9cc6d4f0a18bc5e69b97f589b2ed84ceb89e09d9 | |
parent | 8757b02d6405bbe788281be2eeaa0c23ba27c5b0 (diff) |
Fix shellcheck warnings
-rwxr-xr-x | mesa-debug | 2 | ||||
-rwxr-xr-x | mesa-debug-asan | 2 | ||||
-rwxr-xr-x | mesa-debug-optimized | 2 | ||||
-rwxr-xr-x | mesa-gdb | 2 | ||||
-rwxr-xr-x | mesa-release | 2 | ||||
-rwxr-xr-x | mesa-run | 11 |
6 files changed, 13 insertions, 8 deletions
@@ -5,4 +5,4 @@ export cxxflags="${cflags}" export buildtype=debug export builddir=~/projects/mesa/build-debug -exec mesa-run $@ +exec mesa-run "$@" diff --git a/mesa-debug-asan b/mesa-debug-asan index 151140a..366dba9 100755 --- a/mesa-debug-asan +++ b/mesa-debug-asan @@ -6,4 +6,4 @@ export buildtype=debug export builddir=~/projects/mesa/build-debug-asan export extra_args=-Db_sanitize=address,undefined -exec mesa-run $@ +exec mesa-run "$@" diff --git a/mesa-debug-optimized b/mesa-debug-optimized index c0a07e6..f620f56 100755 --- a/mesa-debug-optimized +++ b/mesa-debug-optimized @@ -5,4 +5,4 @@ export cxxflags="${cflags}" export buildtype=debugoptimized export builddir=~/projects/mesa/build-debug-optimized -exec mesa-run $@ +exec mesa-run "$@" @@ -1,3 +1,3 @@ #!/bin/bash -mesa-debug gdb -q --args $@ +mesa-debug gdb -q --args "$@" diff --git a/mesa-release b/mesa-release index 9e5f347..fa16911 100755 --- a/mesa-release +++ b/mesa-release @@ -5,4 +5,4 @@ export cxxflags="${cflags}" export buildtype=release export builddir=~/projects/mesa/build-release -exec mesa-run $@ +exec mesa-run "$@" @@ -1,5 +1,11 @@ #!/bin/bash +die() { + echo "$1" + exit 255 +} + +[[ -z ${builddir} ]] && die "builddir must be set" prefix="${builddir}"/install machine=$(uname -m) @@ -52,12 +58,11 @@ build) esac if ! command -v jq &> /dev/null; then - echo "jq needs to be installed" - exit -1 + die "jq needs to be installed" fi libdir=$(jq -r '.[] | select(.name == "libdir").value' "${builddir}"/meson-info/intro-buildoptions.json) export LD_LIBRARY_PATH="${prefix}/${libdir}:${LD_LIBRARY_PATH}" export LIBGL_DRIVERS_PATH="${prefix}/${libdir}"/dri export VK_ICD_FILENAMES="${prefix}"/share/vulkan/icd.d/"${vk_icd}" -exec $@ +exec "$@" |