stdenv, swift: Use local fd in is* bash functions for hygiene
This commit is contained in:
committed by
John Ericson
parent
a14cf06182
commit
e57a220f81
@@ -194,6 +194,7 @@ _addRpathPrefix() {
|
||||
# Return success if the specified file is an ELF object.
|
||||
isELF() {
|
||||
local fn="$1"
|
||||
local fd
|
||||
local magic
|
||||
exec {fd}< "$fn"
|
||||
read -n 4 -u $fd magic
|
||||
@@ -205,6 +206,7 @@ isELF() {
|
||||
# "#!").
|
||||
isScript() {
|
||||
local fn="$1"
|
||||
local fd
|
||||
local magic
|
||||
if ! [ -x /bin/sh ]; then return 0; fi
|
||||
exec {fd}< "$fn"
|
||||
|
||||
Reference in New Issue
Block a user