--p4qYPpj5QlsIQJ0K
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, Mar 12, 2001 at 05:13:05PM +0000, Stephen Isard wrote:
>
> I've had a look in
> http://www.cs.bham.ac.uk/research/poplog/freepoplog.html and found a
> description of the popcdtar package. It is clearly overkill for these
> purposes, since it contains both the motif and nomotif tar files. It
> also contains the popextras package, at a more modest 8Mb.
Wow, that makes the script so much cleaner!
Unless there are any other scripts I don't know about, it also gets rid
of the need for csh to be installed.
Attached is a defanged copy of the new script.
- Andrew
--p4qYPpj5QlsIQJ0K
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="install-linux-poplog.sh.debug"
#!/bin/bash
# Uber-installer for Linux/Intel Poplog, by Andrew Sayers <ug55aes@cs.bham.ac.uk>
echo '*** Installing Linux Poplog version 15.53 for Intel and compatible PCs ***'
echo
echo "Please send any bug reports/installation complaints to Andrew Sayers <ug55aes@cs.bham.ac.uk>"
echo
echo -n 'Your system '
if echo $OSTYPE | grep -qi linux && echo $HOSTTYPE | grep -q i386; then
echo -n "is a Linux PC, "
else
echo "doesn't look like a Linux PC."
echo "Are you absolutely sure this is a PC running Linux? [y/N]"
read choice
if [ $choice == 'y' ] || [ $choice == 'Y' ]; then
echo "Fair enough. Please send off a bug report saying that \"$OSTYPE\" is a valid value of \$OSTYPE on a Linux system."
echo -n "This is apparently a Linux PC, "
else
exit 1
fi
fi
# Some safe defaults
export MOTIF_FILE="linux1553.tar.gz"
export X11_LINKS_NEEDED=0
export MOTIF_LINKS_NEEDED=0
if [ -e /usr/X11R6/lib/libX11.so.6 ] && [ -e /usr/X11R6/lib/libXt.so.6 ]; then
if ls -l /usr/X11R6/lib/libX11.so | grep -q libX11.so.6 &&
ls -l /usr/X11R6/lib/libXt.so | grep -q libXt.so.6; then
echo -n 'an X server, '
else
export X11_LINKS_NEEDED=1
echo 'an X server (see below)'
fi
if [ -e /usr/X11R6/lib/libXm.so.2 ]; then
if [ -e /usr/X11R6/lib/libXm.so ]; then
echo 'and Motif.'
else
echo 'and Motif (see below).'
export MOTIF_LINKS_NEEDED=1
fi
export MOTIF_FILE="linuxmotif1553.tar.gz"
else
echo "but not Motif."
echo "Not having Motif isn't fatal, but xved won't have menus etc."
fi
else
echo 'but no X-Server.'
echo "That's not fatal - You'll just have to run plain (non-X) ved."
fi
if [ $X11_LINKS_NEEDED == 1 ]; then
echo
echo 'Making poplog-specific symbolic links for X...'
echo 'doing: ln -s /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libX11.so'
ln -s /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libX11.so
echo 'doing: ln -s /usr/X11R6/lib/libXt.so.6 /usr/X11R6/lib/libXt.so'
ln -s /usr/X11R6/lib/libXt.so.6 /usr/X11R6/lib/libXt.so
echo
fi
if [ $MOTIF_LINKS_NEEDED == 1 ]; then
echo
echo 'Making poplog-specific symbolic links for Motif...'
echo 'doing: ln -s /usr/X11R6/lib/libXm.so.2 /usr/X11R6/lib/libXm.so'
ln -s /usr/X11R6/lib/libXm.so.2 /usr/X11R6/lib/libXm.so
echo
fi
echo "This system can run Linux Poplog"
echo
echo "$MOTIF_FILE is needed for installation."
[ -d /usr/local/poplog ] || mkdir /usr/local/poplog
# Needs to be a function since it might be called repeatedly (see below).
find_installation_files ()
{
if [ -e /usr/local/poplog/$MOTIF_FILE ]; then
echo "$MOTIF_FILE is in /usr/local/poplog"
return 0
elif [ -e ./$MOTIF_FILE ]; then
echo "$MOTIF_FILE is in $PWD"
ln -s $PWD/$MOTIF_FILE /usr/local/poplog/$MOTIF_FILE
return 0
else
echo "$MOTIF_FILE is nowhere to be seen."
echo "If you've already downloaded $MOTIF_FILE, please put it in /usr/local/poplog,"
echo "then run this script again."
echo "Otherwise, you'll need to get it from the Internet. It's available as:"
echo "ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/new/$MOTIF_FILE"
echo "*WARNING* $MOTIF_FILE is a 12MB file *WARNING*"
echo "It will take at least half an hour to download over a modem."
return 1
fi
}
if [ -x /usr/bin/wget ]; then
until find_installation_files ; do
echo
echo 'Download necessary files now? [y/N]'
read choice
if [ $choice == 'y' ] || [ $choice == 'Y' ]; then
echo "Downloading. Press control-c to stop and quit installation for now."
( cd /usr/local/poplog; wget "ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/new/$MOTIF_FILE" ) || exit 2
else
echo
echo "Ok, then you need to get hold of $MOTIF_FILE some other way,"
echo "and put it in /usr/local/poplog"
exit 2
fi
done
else
find_installation_files || exit 2
fi
echo
echo 'Ready to install. Begin? [y/N]'
read choice
if ! [ $choice == 'y' ] && ! [ $choice == 'Y' ]; then
exit 3
fi
echo
echo "Starting the installation. This will probably take a long time."
echo
cd /usr/local/poplog
echo DEBUG: tar -zxvf $MOTIF_FILE
ln -s /usr/local/poplog/local/setup/bin/poplog.sh /usr/local/bin/poplog
echo "Poplog successfully installed."
echo 'Type `poplog +bhamxved` to load xved.'
--p4qYPpj5QlsIQJ0K--
|