diff options
author | Simon Rettberg | 2013-06-10 16:13:03 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-06-10 16:13:03 +0200 |
commit | fa1c2cf93b27191a77a31fc0fa718f66de2c2956 (patch) | |
tree | 268dc88fab5d52c5d18155864dce51e38a9d443b /helper | |
parent | [vmplayer] enable sound and 3D in vmplayer (diff) | |
download | tm-scripts-fa1c2cf93b27191a77a31fc0fa718f66de2c2956.tar.gz tm-scripts-fa1c2cf93b27191a77a31fc0fa718f66de2c2956.tar.xz tm-scripts-fa1c2cf93b27191a77a31fc0fa718f66de2c2956.zip |
[systemd] patch PATH environment variable in systemd-src
Diffstat (limited to 'helper')
-rw-r--r-- | helper/binutil.inc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/helper/binutil.inc b/helper/binutil.inc index 72a43ad2..9ad9e104 100644 --- a/helper/binutil.inc +++ b/helper/binutil.inc @@ -45,21 +45,21 @@ get_dynamic_dependencies() { if [ "x$1" == "x-l" ]; then LOCALSEARCH=1 shift - [ ! -d $1 ] && perror "Directory given does not exist, exiting." - LOCALSEARCHDIR=$1 + [ ! -d "$1" ] && perror "Directory '$1' does not exist, exiting." + LOCALSEARCHDIR="$1" shift fi # main loop over the list of binaries while [ $# != 0 ]; do - local BINARY=$1 + local BINARY="$1" shift # now run ldd on it and save the output in $LDD_OUT local LDD_OUT="ldd_output" - if ldd $BINARY > $LDD_OUT; then + if ldd "$BINARY" > "$LDD_OUT"; then # Case 1: file is a dynamic executable - for LIB in $(cat $LDD_OUT | grep -v "${CURRENT_BLACKLIST}" | awk '{print $1 $2 $3}'); do + for LIB in $(cat "$LDD_OUT" | grep -v "${CURRENT_BLACKLIST}" | awk '{print $1 $2 $3}'); do # split the entry into an array, ex: # libm.so.6 => /lib/libm.so.6 would be split into: # LIBLINK[0] LIBLINK[1] @@ -70,10 +70,10 @@ get_dynamic_dependencies() { else # Case 2: not a dynamic, do nothing pdebug "\t\t\t(Not a dynamic.)" - rm -f $LDD_OUT + rm -f "$LDD_OUT" continue fi - rm -f $LDD_OUT + rm -f "$LDD_OUT" done } @@ -92,16 +92,16 @@ get_dynamic_dependencies() { # If the local was activated in get_dynamic_dependencies # this will search for the library in LOCALSEARCHDIR first. # If its not found, then it will look system-wide. -lib_search(){ +lib_search() { # if activated, start by searching the lib locally if [ "x$LOCALSEARCH" == "x1" ]; then - cd $LOCALSEARCHDIR + cd "$LOCALSEARCHDIR" local LOCAL_MATCHES=$(find . -name "${LIBLINK[0]}") # | awk -F '.' '{print $1}')".so\*) - cd - &>/dev/null + cd - >/dev/null if [ "x${LOCAL_MATCHES}" != "x" ]; then for LOCALLIB in ${LOCAL_MATCHES}; do - get_link_chain "${LOCALSEARCHDIR}"/"${LOCALLIB}" "${LOCALSEARCHDIR}" + get_link_chain "${LOCALSEARCHDIR}/${LOCALLIB}" "${LOCALSEARCHDIR}" get_dynamic_dependencies -l "${LOCALSEARCHDIR}" "${LOCALLIB}" CURRENT_BLACKLIST+="\|${LIBLINK[0]}" done |