Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update downloadCentralLib #71

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions scripts/getAndroidLib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ function downloadLib {
URL="$(parsePackage "${splitPkg[0]}" "${splitPkg[1]}" "${splitPkg[2]}" "$1")"
echo "Fetching AAR from: $URL"
JARFILE="${2//:/_}.jar"
curl "$URL" -o "$JARFILE"
if [ "$(curl -I $URL | grep HTTP | awk '{print $2}')" = "200" ]
then
curl "$URL" -o "$JARFILE"
else
echo "Unable to fetch $URL"
exit 1
fi

echo "Extracting classes.jar from $JARFILE"
unzip "$JARFILE" "classes.jar"
echo "Installing library to library folder..."
Expand All @@ -40,7 +47,7 @@ function downloadLib {
}

function downloadCentralLib {
downloadLib "http://central.maven.org/maven2/" "$1"
downloadLib "https://repo1.maven.org/maven2/" "$1"
}

function downloadJitpackLib {
Expand Down