Add a setup hook for detecting $TMPDIR references in RPATHs and wrapper scripts
This commit is contained in:
@@ -94,6 +94,7 @@ let
|
||||
../../build-support/setup-hooks/compress-man-pages.sh
|
||||
../../build-support/setup-hooks/strip.sh
|
||||
../../build-support/setup-hooks/patch-shebangs.sh
|
||||
../../build-support/setup-hooks/audit-tmpdir.sh
|
||||
../../build-support/setup-hooks/multiple-outputs.sh
|
||||
../../build-support/setup-hooks/move-sbin.sh
|
||||
../../build-support/setup-hooks/move-lib64.sh
|
||||
|
||||
@@ -199,6 +199,18 @@ isELF() {
|
||||
if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi
|
||||
}
|
||||
|
||||
# Return success if the specified file is a script (i.e. starts with
|
||||
# "#!").
|
||||
isScript() {
|
||||
local fn="$1"
|
||||
local magic
|
||||
if ! [ -x /bin/sh ]; then return 0; fi
|
||||
exec {fd}< "$fn"
|
||||
read -n 2 -u $fd magic
|
||||
exec {fd}<&-
|
||||
if [[ "$magic" =~ \#! ]]; then return 0; else return 1; fi
|
||||
}
|
||||
|
||||
|
||||
######################################################################
|
||||
# Initialisation.
|
||||
|
||||
Reference in New Issue
Block a user