home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / sos / Stage.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2000-12-08  |  1KB  |  51 lines

  1. #!/bin/sh
  2. #
  3. # $Id: Stage.sh,v 1.2 2000/12/08 05:48:56 cph Exp $
  4. #
  5. # Copyright (c) 2000 Massachusetts Institute of Technology
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or (at
  10. # your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. # General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. # Utility for MIT Scheme compiler staging.
  22.  
  23. if [ $# -ne 2 ]; then
  24.     echo "usage: $0 <command> <tag>"
  25.     exit 1
  26. fi
  27.  
  28. DIRNAME="STAGE${2}"
  29.  
  30. case "${1}" in
  31. make)
  32.     mkdir "${DIRNAME}" && mv -f *.com *.bci "${DIRNAME}/."
  33.     ;;
  34. unmake)
  35.     mv -f "${DIRNAME}/*" . && rmdir "${DIRNAME}"
  36.     ;;
  37. remove)
  38.     rm -rf "${DIRNAME}"
  39.     ;;
  40. copy)
  41.     cp "${DIRNAME}/*" .
  42.     ;;
  43. link)
  44.     ln "${DIRNAME}/*" .
  45.     ;;
  46. *)
  47.     echo "$0: Unknown command ${1}"
  48.     exit 1
  49.     ;;
  50. esac
  51.