home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / nethack-3.1 / sys / unix / setup.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1993-01-25  |  1.1 KB  |  39 lines

  1. #!/bin/sh
  2. # Copy files to their correct locations.
  3. #
  4. # If arguments are given, try symbolic link first.  This is not the default
  5. # so that most people will have the distribution versions stay around for
  6. # so subsequent patches can apply.  People who pay enough attention to
  7. # know there's a non-default behavior are assumed to pay enough attention
  8. # to keep distribution versions if they modify things.
  9.  
  10. if [ $# -gt 0 ] ; then
  11. #    First, try to make a symbolic link.
  12. #
  13.     ln -s Makefile.top Makefile >/dev/null 2>&1
  14.     if [ $? -eq 0 ] ; then
  15.  
  16.         echo "Lucky you!  Symbolic links."
  17.         rm -f Makefile
  18.  
  19.         umask 0
  20.         ln -s sys/unix/Makefile.top ../../Makefile
  21.         ln -s ../sys/unix/Makefile.dat ../../dat/Makefile
  22.         ln -s ../sys/unix/Makefile.doc ../../doc/Makefile
  23.         ln -s ../sys/unix/Makefile.src ../../src/Makefile
  24.         ln -s ../sys/unix/Makefile.utl ../../util/Makefile
  25.         exit 0
  26.     fi
  27. fi
  28.  
  29. #
  30. #    Otherwise...
  31.  
  32. echo "Copying Makefiles."
  33.  
  34. cp Makefile.top ../../Makefile
  35. cp Makefile.dat ../../dat/Makefile
  36. cp Makefile.doc ../../doc/Makefile
  37. cp Makefile.src ../../src/Makefile
  38. cp Makefile.utl ../../util/Makefile
  39.