From 5899f4f53666b2b93971ad25a46c6ce90c3fb85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 4 May 2018 21:03:21 +0300 Subject: [PATCH] Add the installation bin directory to the path internally in wrapper scripts This allows invoking the script frontends via an explicit path, without adding the directory to the PATH environment variable before calling them. --- wrappers/dlltool-wrapper.sh | 3 +++ wrappers/ld-wrapper.sh | 3 +++ wrappers/objdump-wrapper.sh | 3 +++ wrappers/windres-wrapper.sh | 3 +++ 4 files changed, 12 insertions(+) diff --git a/wrappers/dlltool-wrapper.sh b/wrappers/dlltool-wrapper.sh index 8cd17bd..b3fe7f6 100755 --- a/wrappers/dlltool-wrapper.sh +++ b/wrappers/dlltool-wrapper.sh @@ -1,5 +1,8 @@ #!/bin/sh +DIR="$(cd "$(dirname "$0")" && pwd)" +export PATH=$DIR:$PATH + TARGET="$(basename $0 | sed 's/-[^-]*$//')" ARCH=$(echo $TARGET | sed 's/-.*//') case $ARCH in diff --git a/wrappers/ld-wrapper.sh b/wrappers/ld-wrapper.sh index a0d5b09..a5dc30d 100755 --- a/wrappers/ld-wrapper.sh +++ b/wrappers/ld-wrapper.sh @@ -1,5 +1,8 @@ #!/bin/sh +DIR="$(cd "$(dirname "$0")" && pwd)" +export PATH=$DIR:$PATH + if [ "$1" = "--help" ]; then cat< +DIR="$(cd "$(dirname "$0")" && pwd)" +export PATH=$DIR:$PATH + print_version () { cat <&2 version: LLVM windres (GNU Binutils compatible) 0.1