]>
git.rmz.io Git - dotfiles.git/blob - bin/socheck
   7     echo "Usage :  $0 [options] [PATH] 
   8     Checks installed libraries for missing dynamic links. 
  11     -d,--depth      Max depth to search 
  12     -h,--help       Display this message 
  13     -v,--version    Display script version" 
  18         if sudo LD_LIBRARY_PATH
=$LD_LIBRARY_PATH ldd 
$f | grep -q "not found"; then 
  19             echo "$(LC_ALL=C pacman -Qoq $f) $f seems broken!" 
  26 while [[ $# > 0 ]]; do 
  30         -d|--depth)    depth
=$2; shift 2 ;; 
  31         -h|--help)     usage
; exit 0 ;; 
  32         -v|--version)  echo "$0 -- Version $version"; exit 0 ;; 
  34             echo -e "\n  Option does not exist : $opt\n" 
  37         *) args
+=($opt); shift ;; 
  43 [[ $depth ]] && findopts
+=(-maxdepth "$depth") 
  48 echo "Searching broken binaries...." 
  49 binpath
=${path:-/usr/bin} 
  50 bins
=( $
(find "$binpath" "${findopts[@]}" -type f 
-executable) ) 
  54 echo "Searching broken libs...." 
  55 libpath
=${path:-/usr/lib} 
  56 libs
=( $
(find $libpath "${findopts[@]}" -name '*.so' -type f 
-executable) )