aboutsummaryrefslogtreecommitdiffstats
path: root/build-tools/linux-amd64/script2.txt
blob: 2e6a0d2ff81e2a12ed64b7a7cd101ee778853e95 (plain)
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

EOF
agreed=
while [ x$agreed = x ]; do
    echo
    echo "Do you agree to the above license terms? [yes or no] "
    read reply leftover
    case $reply in
        y* | Y*)
            agreed=1;;
        n* | n*)
    echo "If you don't agree to the license you can't install this sofware";
    exit 1;;
    esac
done
if [ ! -w `pwd` ] ; then
    echo "You do not have write permission to `pwd`"
    echo "Java 3D installation failed"
    exit 1
fi
outname=install.sfx.$$
echo "Unpacking..."
tail -n +@LINECOUNT@ $0 > $outname
if [ -x /usr/bin/sum ] ; then
    echo "Checksumming..."

    sum=`/usr/bin/sum $outname`
    index=1
    for s in $sum
    do
        case $index in
        1)  sum1=$s;
            index=2;
            ;;
        2)  sum2=$s;
            index=3;
            ;;
        esac
    done
    if expr $sum1 != @SUM1@ || expr $sum2 != @SUM2@  ; then
        echo "The download file appears to be corrupted.  Please refer"
        echo "to the Troubleshooting section of the Installation"
        echo "Instructions on the download page for more information."
        echo "Please do not attempt to install this archive file."
        rm -f $outname
        exit 1
    fi
else
    echo "Can't find /usr/bin/sum to do checksum.  Continuing anyway."
fi
echo "Extracting..."
chmod u+x $outname
./$outname
rm -f $outname
echo "Done."
exit 0