I need help with syntax. I am successfully using parameters else where in my script. But for this portion, I cannot figure out the proper syntax for this particular substitution. It has to be the combination of curly brackets and double quotes.
Thanks in advance for your help.
This is a sample of one of my many attempts:
parameter "OLD_JAVA_VERSION" = "jdk1.8.0_131"
parameter "NEW_JAVA_VERSION" = "jdk1.8.0_141"
parameter "OLD_JAVA_TAR" = "jdk-8u131"
parameter "OLD_JAVA_TAR_FULL" = "jdk-8u131-linux-x64.tar.gz"
parameter "NEW_JAVA_TAR" = "jdk-8u141"
if {exists folder "/usr/lib/jvm/{parameter "OLD_JAVA_VERSION"}"}
wait rm -rf /usr/lib/jvm/{parameter "OLD_JAVA_VERSION"}}
endif
if {exists file "/usr/lib/jvm/{parameter "OLD_JAVA_TAR_FULL"}"}
delete "/usr/lib/jvm/{parameter "OLD_JAVA_TAR_FULL"}"
endif
This paragraph is what (in reality) I want the script to look like and execute.
if {exists folder "/usr/lib/jvm/jdk1.8.0_131"}
wait rm -rf /usr/lib/jvm/jdk1.8.0_131}
endif
if {exists file "/usr/lib/jvm/jdk-8u131-linux-x64.tar.gz"}
delete "/usr/lib/jvm/jdk-8u131-linux-x64.tar.gz"
endif