index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | find-libdeps.in | 14 |
diff --git a/find-libdeps.in b/find-libdeps.in index 794a2cd..cb68237 100644 --- a/find-libdeps.in +++ b/find-libdeps.in @@ -28,10 +28,10 @@ usage() { echo print ' <soname>=<soversion>-<soarch>' echo - prose 'Where <soversion> is the shared library version, or + prose "Where <soversion> is the shared library version, or <soname> repeated if there is no version attached; and - <soarch> is the architecture of the library (either `32` - or `64`, based on the ELF Class).' + <soarch> is the architecture of the library (either \`32\` + or \`64\`, based on the ELF Class)." echo print "Options:" flag "--ignore-internal" "Ignore internal libraries; libraries @@ -48,7 +48,7 @@ if [[ $1 = '-h' ]]; then fi if [[ -d $1 ]]; then - pushd $1 >/dev/null + pushd "$1" >/dev/null else setup_workdir @@ -65,10 +65,10 @@ process_sofile() { soname="${sofile%.so?(+(.+([0-9])))}".so # extract the major version: 1 soversion="${sofile##*\.so\.}" - if [[ "$soversion" = "$sofile" ]] && (($IGNORE_INTERNAL)); then + if [[ "$soversion" = "$sofile" ]] && ((IGNORE_INTERNAL)); then continue fi - if ! in_array "${soname}=${soversion}-${soarch}" ${soobjects[@]}; then + if ! in_array "${soname}=${soversion}-${soarch}" "${soobjects[@]}"; then # libfoo.so=1-64 echo "${soname}=${soversion}-${soarch}" soobjects+=("${soname}=${soversion}-${soarch}") @@ -80,7 +80,7 @@ case $script_mode in provides) find_args=(-name '*.so*');; esac -find . -type f "${find_args[@]}" | while read filename; do +find . -type f "${find_args[@]}" | while read -r filename; do if [[ $script_mode = "provides" ]]; then # ignore if we don't have a shared object if ! LC_ALL=C readelf -h "$filename" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then |