#!/bin/sh
#
-# $Id: Clean.sh,v 1.8 2002/11/21 03:39:27 cph Exp $
+# $Id: Clean.sh,v 1.9 2002/11/21 03:51:18 cph Exp $
#
# Copyright (c) 2000, 2001, 2002 Massachusetts Institute of Technology
#
fi
if [ "${MAINTAINER}" = "yes" ]; then
- for FN in .edwin-ffi Clean.sh Makefile Setup.sh Stage.sh Tags.sh; do
- if [ -L ${FN} ]; then
- echo "rm ${FN}"
- rm ${FN}
- fi
+ maybe_unlink Makefile ../Makefile.std
+ maybe_unlink .edwin-ffi ed-ffi.scm
+ for FN in Clean.sh Setup.sh Stage.sh Tags.sh; do
+ maybe_unlink "${FN}" "../etc/${FN}"
done
fi
#!/bin/sh
#
-# $Id: functions.sh,v 1.2 2002/11/20 19:46:05 cph Exp $
+# $Id: functions.sh,v 1.3 2002/11/21 03:51:36 cph Exp $
#
-# Copyright (c) 2000 Massachusetts Institute of Technology
+# Copyright (c) 2000, 2002 Massachusetts Institute of Technology
#
# This file is part of MIT Scheme.
#
maybe_mkdir ()
{
- if [ ! -e ${1} ]; then
+ if [ ! -e "${1}" ]; then
echo "mkdir ${1}"
- mkdir ${1}
+ mkdir "${1}"
fi
}
maybe_link ()
{
- if [ ! -e ${1} ] && [ ! -L ${1} ]; then
+ if [ ! -e "${1}" ] && [ ! -L "${1}" ]; then
echo "ln -s ${2} ${1}"
- ln -s ${2} ${1}
+ ln -s "${2}" "${1}"
+ fi
+}
+
+maybe_unlink ()
+{
+ if [ -L "${1}" ] && [ "${1}" -ef "${2}" ]; then
+ echo "rm ${1}"
+ rm "${1}"
fi
}