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
|
#!/bin/sh
#
# IPTraf Setup System
# Written by Gerard Paul Java <riker@seul.org>
# Version 2.5.0
#
# This script determines whether the IPTraf distribution is source code
# or ready-to-run executable files. It will automatically recompile
# source code before installation, and will immediately install
# precompiled executables.
#
# If started with the -c command-line option, the software will be
# recompiled from the sources before installation.
#
# The actual installation scripts are in the src/ directory.
#
VERSION=`cat src/version`
clear
echo "====================================================================="
echo " IPTraf Version $VERSION Setup"
echo " Target Platform: $(uname -s)/$(uname -m)"
echo "---------------------------------------------------------------------"
echo
if [ ! -x src/iptraf -o "$1" = "-c" ]; then
if [ -f src/iptraf.c ]; then
echo ">>>>>> COMPILING IPTRAF $VERSION FROM SUPPLIED SOURCE CODE"
echo
/usr/bin/make -C src clean
/usr/bin/make -C src all
else
echo "*** ERROR: Unable to locate source files."
echo "*** If this is a binary-only distribution of IPTraf, try running $0"
echo " again without -c."
echo
echo "*** $0 exiting with error code 1"
echo
exit 1
fi
fi
/usr/bin/make -C src install
|