#!/bin/csh -f
# TXL Unix Installation Script, January 2001
# Copyright 2001-2003 Queen's University at Kingston
echo ""
echo "Installling TXL 10.3 on your system."
sleep 1
# Default locations
set DEFAULT=true
set TXLBIN=/usr/local/bin
set TXLLIB=/usr/local/lib/txl
set TXLMAN=/usr/local/man/man1
# Check what kind of installation we have here
if ("$USER" != root) then
echo ""
echo "Warning - you are not running as root, so you can install TXL for yourself only."
echo "If you intend to install TXL for all users on this machine,"
echo "you will have to run this install script as root."
echo ""
echo "Do you want to continue to install TXL for yourself only? (y/n) :"
set YESNO=$<
if ("$YESNO" == "y") then
echo ""
echo "Installing TXL for $USER only."
set DEFAULT=false
set TXLBIN=~/bin
set TXLLIB=~/txl/lib
set TXLMAN=~/txl/man/man1
else
exit 99
endif
endif
sleep 1
# Install TXL commands
echo ""
echo "Installing TXL commands into $TXLBIN"
/bin/mkdir -p $TXLBIN
/bin/cp ./bin/* $TXLBIN
if ("$DEFAULT" != "true") then
foreach i ($TXLBIN/txlc $TXLBIN/txlp)
/usr/bin/sed "s;/usr/local/lib/txl;$TXLLIB;" < $i > $i.temp
/bin/mv $i.temp $i
chmod 0755 $i
end
endif
sleep 1
# Install TXL library
echo ""
echo "Installing TXL library into $TXLLIB"
/bin/mkdir -p $TXLLIB
/bin/cp ./lib/* $TXLLIB
sleep 1
# Install TXL manual entries
echo ""
echo "Installing TXL manual entries into $TXLMAN"
/bin/mkdir -p $TXLMAN
/bin/cp ./man/man1/* $TXLMAN
sleep 1
# Test TXL
echo ""
echo "Testing TXL"
echo ""
sleep 1
cd ./test
$TXLBIN/txl Ultimate.Question
echo ""
echo "Done."
echo ""
# ---
# Rev 12.3.03
syntax highlighted by Code2HTML, v. 0.9.1