diff options
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -160,6 +160,7 @@ warning() { error() { local mesg=$1; shift printf "$RED==> ERROR:$NC$BOLD $mesg$NC\n" "$@" >&2 + return 1 } die() { @@ -320,7 +321,10 @@ add_dir() { local path=$1 mode=${2:-755} - [[ -e $BUILDROOT$1 ]] && return 0 # file exists + if [[ -d $BUILDROOT$1 ]]; then + # ignore dir already exists + return 0 + fi (( QUIET )) || plain "adding dir: %s" "$path" command install -dm$mode "$BUILDROOT$path" @@ -398,7 +402,8 @@ add_binary() { # always add the binary itself add_file "$binary" "$dest" "$mode" - lddout=$(ldd "$binary" 2>/dev/null) || return 0 # not a binary! + # negate this so that the RETURN trap is not fired on non-binaries + ! lddout=$(ldd "$binary" 2>/dev/null) && return 0 # resolve sodeps regex='(/.+) \(0x[a-fA-F0-9]+\)' |