Last active
November 18, 2020 14:58
-
-
Save ttimot24/175e99b3e46882bfad759ee942a135a9 to your computer and use it in GitHub Desktop.
GlassFish installer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "----------------------------------------------" | |
echo "| GlassFish installer |" | |
echo "| by: Timot Tarjani - version: 1.2 |" | |
echo "----------------------------------------------" | |
if [ -z ${1+x} ]; then | |
echo "Please pass version as first argument!"; | |
exit 1; | |
else | |
export GLASSFISH_VERSION=$1 | |
fi; | |
#wget http://download.oracle.com/glassfish/${GLASSFISH_VERSION}/nightly/latest-glassfish.zip | |
wget https://download.eclipse.org/ee4j/glassfish/glassfish-${GLASSFISH_VERSION}.zip -O latest-glassfish.zip | |
if [ ! -f latest-glassfish.zip ]; then | |
echo "Failed to download Glassfish. Requested version: ${GLASSFISH_VERSION}"; | |
exit 1; | |
fi; | |
export INSTALL_DIR=$(unzip -qql latest-glassfish.zip | sed -r '1 {s/([ ]+[^ ]+){3}\s+//;q}' | sed -e 's/\/$//' ) | |
echo "Unzipping ${INSTALL_DIR}..." | |
unzip -q latest-glassfish.zip | |
rm latest-glassfish.zip | |
./${INSTALL_DIR}/bin/asadmin start-domain --verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment