#!/bin/sh
# Add LD_CONFIG PATH
#

if [ "$1" ]; then
  # Add LDCONFIG path
  LDCONF=/etc/ld.so.conf
  grep -x "$1" $LDCONF > /dev/null
  if [ "$?" = "1" ]; then
     echo "Adding $1 to ldpath"
     echo "$1" >> $LDCONF
  fi
  /sbin/ldconfig || /usr/sbin/ldconfig
else
  echo 'Usage: install-lib <path>'
  echo Add the path as a loadable library path 
fi
 
