summaryrefslogtreecommitdiffstats
path: root/helper
diff options
context:
space:
mode:
authorJonathan Bauer2013-05-28 15:07:25 +0200
committerJonathan Bauer2013-05-28 15:07:25 +0200
commit5d8bdc6b05cb31faedc0161de1842af266d84cdd (patch)
treecb17093272781065827658bbe3bcec204dc3c10a /helper
parentfix mkhomedir for suse (diff)
downloadtm-scripts-5d8bdc6b05cb31faedc0161de1842af266d84cdd.tar.gz
tm-scripts-5d8bdc6b05cb31faedc0161de1842af266d84cdd.tar.xz
tm-scripts-5d8bdc6b05cb31faedc0161de1842af266d84cdd.zip
beauty operations :)
Diffstat (limited to 'helper')
-rw-r--r--helper/binutil.inc28
1 files changed, 14 insertions, 14 deletions
diff --git a/helper/binutil.inc b/helper/binutil.inc
index 607041f0..261ccf16 100644
--- a/helper/binutil.inc
+++ b/helper/binutil.inc
@@ -39,8 +39,8 @@ get_dynamic_dependencies() {
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]
- local liblink=(${LIB//=>/ })
+ # LIBLINK[0] LIBLINK[1]
+ local LIBLINK=(${LIB//=>/ })
lib_search
done
else
@@ -59,13 +59,13 @@ lib_search(){
# if activated, start by searching the lib locally
if [ "x$LOCALSEARCH" == "x1" ]; then
cd $LOCALSEARCHDIR
- local LOCAL_MATCHES=$(find . -name "${liblink[0]}") # | awk -F '.' '{print $1}')".so\*)
+ local LOCAL_MATCHES=$(find . -name "${LIBLINK[0]}") # | awk -F '.' '{print $1}')".so\*)
cd - &>/dev/null
if [ "x${LOCAL_MATCHES}" != "x" ]; then
- for llib in ${LOCAL_MATCHES}; do
- get_link_chain "${LOCALSEARCHDIR}"/"${llib}" "${LOCALSEARCHDIR}"
- get_dynamic_dependencies -l "${LOCALSEARCHDIR}" "${llib}"
- CURRENT_BLACKLIST+="\|${liblink[0]}"
+ for LOCALLIB in ${LOCAL_MATCHES}; do
+ get_link_chain "${LOCALSEARCHDIR}"/"${LOCALLIB}" "${LOCALSEARCHDIR}"
+ get_dynamic_dependencies -l "${LOCALSEARCHDIR}" "${LOCALLIB}"
+ CURRENT_BLACKLIST+="\|${LIBLINK[0]}"
done
# found the libs, we are done
return
@@ -74,12 +74,12 @@ lib_search(){
fi
# search the lib on the system since it was not found earlier
- if [ ! -z ${liblink[1]} ] && [ "x${liblink[1]}" != "xnot" ]; then
+ if [ ! -z ${LIBLINK[1]} ] && [ "x${LIBLINK[1]}" != "xnot" ]; then
# get chain of symlink for that lib
- get_link_chain ${liblink[1]}
- CURRENT_BLACKLIST+="\|${liblink[1]}"
+ get_link_chain "${LIBLINK[1]}"
+ CURRENT_BLACKLIST+="\|${LIBLINK[1]}"
else
- pwarning "\t\tLib '${liblink[0]}' from required dir '$ENTRY' neither found in build directory nor on this system."
+ pwarning "\t\tLib '${LIBLINK[0]}' from required dir '$ENTRY' neither found in build directory nor on this system."
pwarning "\t\tIf this lib is not supplied by another module, this module will probably fail in your final system"
fi
}
@@ -130,13 +130,13 @@ get_link_chain() {
# now we check for symlinks
local TRY=0
- while [ -L $LINK ] && [ $TRY -lt 10 ]; do
+ while [ -L "$LINK" ] && [ $TRY -lt 10 ]; do
let TRY=TRY+1
# save the directory prefix
- CURRENTDIR=$(dirname ${LINK})
+ CURRENTDIR=$(dirname "${LINK}")
# first follow the link
- LINK=$(readlink $LINK)
+ LINK=$(readlink "$LINK")
CHAIN+=" -> $LINK"
# $LINK can be absolute or relative, check cases
[[ "$LINK" == /* ]] || LINK=$(canonicalize "$CURRENTDIR"/"${LINK}")