annotate scripts/setjava.sh @ 330:70ea30cbe883

update locking strat for git specific gradle script.
author Marc Davis <davis@ssdt-ohio.org>
date Fri, 03 Mar 2023 22:02:56 -0500
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