home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / util / lninst.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1995-07-12  |  677 b   |  56 lines

  1. #!/bin/sh
  2.  
  3. #
  4. # This accepts bsd-style install arguments and simply makes symbolic links.
  5. #
  6.  
  7. flags=""
  8. dst=""
  9. src=""
  10. dostrip=""
  11.  
  12. while [ x$1 != x ]; do
  13.     case $1 in 
  14.     -c) shift
  15.         continue;;
  16.  
  17.     -[mog]) flags="$flags $1 $2 "
  18.         shift
  19.         shift
  20.         continue;;
  21.  
  22.     -s) dostrip="strip"
  23.         shift
  24.         continue;;
  25.  
  26.     *)  if [ x$src = x ] 
  27.         then
  28.         src=$1
  29.         else
  30.         dst=$1
  31.         fi
  32.         shift
  33.         continue;;
  34.     esac
  35. done
  36.  
  37. if [ x$src = x ] 
  38. then
  39.     echo "syminst:  no input file specified"
  40.     exit 1
  41. fi
  42.  
  43. if [ x$dst = x ] 
  44. then
  45.     echo "syminst:  no destination specified"
  46.     exit 1
  47. fi
  48.  
  49. if [ -d $dst ]; then
  50.     rm -f $dst/`basename $src`
  51. else
  52.     rm -f $dst
  53. fi
  54.  
  55. ln -s `pwd`/$src $dst
  56.