-
-
Save kmcquade/46a87a605944305646f6e53fc93e7007 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Clone the Firing Range Repository | |
git clone https://github.com/google/firing-range.git | |
# Change to 'firing-range' directory | |
cd firing-range | |
# Download the AppEngine SDK | |
wget https://storage.googleapis.com/appengine-sdks/featured/appengine-java-sdk-1.9.23.zip | |
unzip appengine-java-sdk-1.9.23.zip | |
rm -f appengine-java-sdk-1.9.23.zip | |
mv appengine-java-sdk-1.9.23 appengine-java-sdk | |
# Set the SDK path in build.xml | |
sed -i 's/<property name="appengine.sdk" location=\"\(.*\)\"\/>/<property name="appengine.sdk" location=\"appengine-java-sdk\"\/>/' build.xml | |
# Compile using Ant | |
ant compile | |
# Create a run script | |
cd .. | |
WD=$(pwd) | |
SDK=$WD/firing-range/appengine-java-sdk/bin | |
WAR=$WD/firing-range/war | |
BINDING=0.0.0.0 | |
PORT=8080 | |
cat << EOF > run-firing-range.sh | |
#!/bin/bash | |
# Start the server as a background process | |
$SDK/dev_appserver.sh --address=$BINDING --port=$PORT $WAR & | |
EOF | |
chmod +x run-firing-range.sh | |
# Show Success Message | |
echo 'Firing Range successfuly installed' | |
# Run Firing Range | |
bash -c "$WD/run-firing-range.sh" | |
echo 'Google Firing Range installation finished' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment