-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathENVI-5.5.2_install
executable file
·53 lines (40 loc) · 1.65 KB
/
ENVI-5.5.2_install
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
#!/bin/bash
# This script installs ENVI 5.5.2 & IDL 8.7.2
# Brian Alston JUNE 2019
# You need to download the ENVI installer from the Harris Download and License Center
# (https://harrisgeospatial.flexnetoperations.com/control/xlsv/login?nextURL=%2Fcontrol%2Fxlsv%2Fhome)
# using a UCL site admin login.
# Place it somewhere in your file-system and set the SRC_ARCHIVE & ENVI_INSTALLER variables
# appropriately.
VERSION=${VERSION:-5.5.2}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/ENVI/${VERSION}}
SRC_ARCHIVE=${SRC_ARCHIVE:-/shared/ucl/apps/ENVI/installers}
ENVI_INSTALLER=${ENVI_INSTALLER:-envi552-linux.tar.gz}
ANSWER_FILE=${ANSWER_FILE:-/shared/ucl/apps/build_scripts/files/ENVI-5.5.2_answer_file}
LICENSE_FILE=${LICENSE_FILE:-/shared/ucl/apps/build_scripts/files/ENVI-5.5.2_license_file}
set -e
export PATH=$INSTALL_PREFIX/bin:$PATH
startDir=`pwd`
if [ ! -f $SRC_ARCHIVE/$ENVI_INSTALLER ]
then
echo ""
echo "*** ERROR: Cannot find ENVI installer"
echo ""
echo "You need to download the ENVI installer from the Harris Download and License Center"
echo " (https://harrisgeospatial.flexnetoperations.com/control/xlsv/login?nextURL=%2Fcontrol%2Fxlsv%2Fhome)"
echo "using a UCL site admin login."
echo "Place it somewhere in your file-system and set the SRC_ARCHIVE & ENVI_INSTALLER variables"
echo "appropriately."
echo ""
exit 1
fi
temp_dir=`mktemp -d -p /dev/shm`
mkdir -p $temp_dir/ENVI
# Unpack the installer archive
cd $temp_dir/ENVI
tar -xvf $SRC_ARCHIVE/$ENVI_INSTALLER
# Run the installer.
./install.sh -s < $ANSWER_FILE
# Install the UCL license file.
cd $INSTALL_PREFIX/license
cp $LICENSE_FILE o_licenseserverurl.txt