1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
#!/bin/bash
#
# Simple shell script for installing SPLAT! and associated utilities.
# Written by John A. Magliacane, KD2BD April 2002.
# Last update: March 1, 2008.
#
install_splat()
{
if [ -x splat ]; then
cp splat /usr/local/bin
echo "SPLAT! installed!"
fi
if [ -x splat-hd ]; then
cp splat-hd /usr/local/bin
echo "SPLAT!-HD installed!"
fi
}
install_utils()
{
cd utils
./install all
cd ..
echo "utils installed!"
}
install_man()
{
if [ -d /usr/local/man/man1 ]; then
cp docs/english/man/splat.1 /usr/local/man/man1/splat.1
echo "man page installed!"
else
if [ -d /usr/man/man1 ]; then
cp docs/english/man/splat.1 /usr/man/man1/splat.1
echo "man page installed!"
fi
fi
if [ -d /usr/local/man/es/man1 ]; then
cp docs/spanish/man/splat.1 /usr/local/man/es/man1/splat.1
echo "spanish man page installed!"
else
if [ -d /usr/man/es/man1 ]; then
cp docs/spanish/man/splat.1 /usr/man/es/man1/splat.1
echo "spanish man page installed!"
fi
fi
}
whoami=`whoami`
if [ "$#" = "0" ]; then
echo "Usage: ./install { splat, utils, man, all }"
else
if [ "$whoami" = "root" ]; then
if [ "$1" = "splat" ] && [ -x splat ]; then
install_splat
fi
if [ "$1" = "utils" ]; then
install_utils
fi
if [ "$1" = "man" ]; then
install_man
fi
if [ "$1" = "all" ] && [ -x splat ]; then
install_splat
install_utils
install_man
fi
else
echo "Sorry, $whoami. You need to be 'root' to install this software. :-("
fi
if [ "$1" != "splat" ] && [ "$1" != "utils" ] && [ "$1" != "man" ] && [ "$1" != "all" ]; then
echo "Usage: ./install { splat, utils, man, all }"
fi
fi
|