Skip to content

Instantly share code, notes, and snippets.

@baldur
Created August 13, 2014 17:21
Show Gist options
  • Save baldur/941d72c6eec648d0d157 to your computer and use it in GitHub Desktop.
Save baldur/941d72c6eec648d0d157 to your computer and use it in GitHub Desktop.
install-support-jar.sh
#!/bin/sh
#
# This script installs the Android Support v4 jar in your local Maven repository.
#
# Usage:
# install-support-jar.sh
version=$1
echo "Downloading support_r$version.zip"
wget https://dl-ssl.google.com/android/repository/support_r$version.zip
unzip support_r$version.zip
mv support support_r$version
echo "Installing com.android.support:support-v4:$version"
mvn -q install:install-file -DgroupId=com.android.support -DartifactId=support-v4 \
-Dversion=$version -Dpackaging=jar -Dfile=support_r$version/v4/android-support-v4.jar
echo "Deleting file support_r$version.zip"
rm support_r$version.zip
echo "Deleting folder support_r$version"
rm -rf support_r$version
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment