Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.