Mercurial > public > develkit
view scripts/setjava.sh @ 207:7a17678c9a73
add script to help set java version
author | smith@nwoca.org |
---|---|
date | Tue, 01 Sep 2015 21:25:16 +0100 |
parents | |
children |
line wrap: on
line source
#!/bin/bash if [ "${1}" == "7" ] then export JAVA_HOME=$JAVA7 else export JAVA_HOME=$JAVA8 fi IFS=':' CYGWIN=nodosfilewarning PATHNEW='' for A in ${PATH} do if [[ "$A" != *"Java"* || "$A" != *"jdk"* || "$A" == *"java"* ]] then PATHNEW=$PATHNEW:"$A" fi done export PATH=$JAVA_HOME/bin$PATHNEW # Output echo -e "JAVA_HOME\t" $JAVA_HOME echo -e "PATH" for A in ${PATH} do echo "${A}" done