annotate scripts/setjava.sh @ 268:f1f4ec4633ca

add ssdt-releases repo for older builds
author smith@nwoca.org
date Thu, 29 Nov 2018 15:43:43 +0000
parents 7a17678c9a73
children
rev   line source
207
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
1 #!/bin/bash
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
2
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
3 if [ "${1}" == "7" ]
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
4 then
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
5 export JAVA_HOME=$JAVA7
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
6 else
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
7 export JAVA_HOME=$JAVA8
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
8 fi
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
9
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
10 IFS=':'
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
11 CYGWIN=nodosfilewarning
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
12 PATHNEW=''
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
13 for A in ${PATH}
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
14 do
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
15
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
16 if [[ "$A" != *"Java"* || "$A" != *"jdk"* || "$A" == *"java"* ]]
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
17 then
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
18 PATHNEW=$PATHNEW:"$A"
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
19 fi
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
20
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
21 done
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
22 export PATH=$JAVA_HOME/bin$PATHNEW
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
23
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
24 # Output
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
25 echo -e "JAVA_HOME\t" $JAVA_HOME
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
26 echo -e "PATH"
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
27 for A in ${PATH}
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
28 do
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
29 echo "${A}"
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
30 done
7a17678c9a73 add script to help set java version
smith@nwoca.org
parents:
diff changeset
31