-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.sh
executable file
·42 lines (32 loc) · 1.25 KB
/
configure.sh
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
#!/bin/bash
# This script creates bash scripts in the current directory
# called 'geotess' and 'geotessbuilder'
# find the full path to the geo-tess-java jar file located in this directory
jarfile=$(pwd)/target/$(basename $(pwd)/$(find . -name '*-jar-with-dependencies.jar'))
echo jarfile is "$jarfile"
if [[ -z "$jarfile" ]]; then
echo ERROR: geotess jar file not found in $(pwd)
exit -1
fi
# ---- GeoTessExplorer
echo "Creating executable script file geotess that launches GeoTessExplorer"
echo "#!/bin/bash" > geotess
echo "java -jar $jarfile \$*" >> geotess
chmod 777 geotess
# ----
echo "Creating executable script file geotessbuilder that launches GeoTessBuilderMain"
echo "#!/bin/bash" > geotessbuilder
echo "java -cp $jarfile gov.sandia.geotessbuilder.GeoTessBuilderMain \$*" >> geotessbuilder
chmod 777 geotessbuilder
# ---- Add to path
# The script also prints to screen recommended addition to
# the user's .cshrc, .bash_profile, or .profile that will make the new
# executable available via the PATH. No changes to the user's
# environment are actually made.
if [ `uname -s` = Darwin ]; then
echo "Add this line to your .bash_profile"
echo "export PATH=$(pwd):\$PATH"
else
echo "Add this line to your .cshrc file"
echo "set path=( $(pwd) \$path )"
fi