Public feed #378915

Unnamed

public text v1 · immutable
Raw Edit
·published 2007-03-02 21:40 UTC
rendered paste body
# Make a list of all of vim's library dependencies:

 # Variable that will hold all library deps of a binary.
  Final=""

  # Make a list of dependenices, trim anything before =>
  deps=`ldd /usr/bin/vim |sed 's/.*=>\(.*\) (.*/\1/'`

  # Trace all symbolic libary links to the actual library file.
  for dep in $deps; do
    # Add this dependency to the list
    Final="$Final $dep"
    
    # While this dependency is a link, recurse (until we hit a real file)
    while [ -L $dep ]; do
      # Find what the link points to
      dep_new=`readlink $dep`
      # Since many links are reliative, find the base dir
      prefix=`echo $dep |sed 's/\(.*\)\/.*$/\1/'`
      # Set $dep to the fully qualified path to what link points to
      dep=$prefix/$dep_new
      # Add this to the $Final 
      Final="$Final $dep"
    done
  done

ls -alF $Final