Last active
August 29, 2015 13:58
-
-
Save nestoru/10284218 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 -e | |
# installGetHttpStatusCode.sh | |
# @author: Nestor Urquiza | |
# @date: 20140409 | |
USAGE="Usage: `basename $0` <baseInstallationPath>" | |
baseInstallationPath=$1 | |
if [ $# -ne "1" ] | |
then | |
echo $USAGE | |
exit 1 | |
fi | |
installationPath=$baseInstallationPath/http-test | |
mkdir -p $installationPath | |
rm -fr $installationPath/* | |
cd $installationPath | |
curl -O https://archive.apache.org/dist/httpcomponents/httpclient/binary/httpcomponents-client-4.3.3-bin.tar.gz | |
tar xvfz httpcomponents-client-4.3.3-bin.tar.gz | |
curl -o GetHttpStatusCode.java https://gist.githubusercontent.com/nestoru/10281854/raw/13f076926270a205d5237534557837ddbe0f9dbf/GetHttpStatusCode.java | |
javac -cp ".:./httpcomponents-client-4.3.3/lib/*" GetHttpStatusCode.java | |
sample_command="cd $installationPath; java -cp \".:./httpcomponents-client-4.3.3/lib/*\" GetHttpStatusCode https://github.com" | |
echo "Usage Example: $sample_command" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment