File: Setup

package info (click to toggle)
iptraf 3.0.0-8.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,928 kB
  • ctags: 1,229
  • sloc: ansic: 12,563; sh: 151; makefile: 137; awk: 1
file content (48 lines) | stat: -rwxr-xr-x 1,549 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
#
# IPTraf Setup System
# Written by Gerard Paul Java <riker@seul.org>
# Version 2.8.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.
#
# After the actual installation, the program will prompt you if you
# want convert your filters.  You should do so, since there is a
# change to the filter formats.
#
# 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 support 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