1#!/bin/sh 2# 3# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 4# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 5# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 6# Massachusetts Institute of Technology 7# 8# This file is part of MIT/GNU Scheme. 9# 10# MIT/GNU Scheme is free software; you can redistribute it and/or 11# modify it under the terms of the GNU General Public License as 12# published by the Free Software Foundation; either version 2 of the 13# License, or (at your option) any later version. 14# 15# MIT/GNU Scheme is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18# General Public License for more details. 19# 20# You should have received a copy of the GNU General Public License 21# along with MIT/GNU Scheme; if not, write to the Free Software 22# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 23# 02110-1301, USA. 24 25# Utility to set up symbolic links at installation. 26 27set -e 28 29. `dirname "${0}"`/functions.sh 30 31if [ ${#} -eq 2 ]; then 32 DIR=${1} 33 EXE=${2} 34else 35 echo "usage: ${0} <directory> <name>" 36 exit 1 37fi 38 39case ${EXE} in 40 mit-scheme-c|mit-scheme-native) 41 if test ! -f "${DIR}"/mit-scheme; then 42 run_cmd rm -f "${DIR}"/mit-scheme 43 run_cmd ln -s "${EXE}" "${DIR}"/mit-scheme 44 fi 45 ;; 46 mit-scheme-*) 47 if test ! -f "${DIR}"/mit-scheme-native; then 48 run_cmd rm -f "${DIR}"/mit-scheme-native 49 run_cmd ln -s "${EXE}" "${DIR}"/mit-scheme-native 50 fi 51 if test ! -f "${DIR}"/mit-scheme; then 52 run_cmd rm -f "${DIR}"/mit-scheme 53 run_cmd ln -s mit-scheme-native "${DIR}"/mit-scheme 54 fi 55 ;; 56esac 57 58run_cmd rm -f "${DIR}"/scheme "${DIR}"/bchscheme 59run_cmd ln -s mit-scheme "${DIR}"/scheme 60run_cmd ln -s mit-scheme "${DIR}"/bchscheme 61