Skip to content

Commit

Permalink
chore: Update install_android_sdk script to download Android SDK fr…
Browse files Browse the repository at this point in the history
…om a specified URL
  • Loading branch information
bartekpacia committed Aug 26, 2024
1 parent 38b9552 commit a6fb9f9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bin/install_android_sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env sh

set -euo pipefail

URL="${1:-}"

if [ -z "$URL" ]; then
echo "URL is required. Get it from here: https://stackoverflow.com/a/78890086/7009800"
exit 1
fi

curl -fsSL \
--output-dir ~ \
--output android-clt.zip \
"$URL"

cd ~
unzip android-clt.zip
mkdir -p "$ANDROID_HOME/cmdline-tools/latest"
mv ~/cmdline-tools/* "$ANDROID_HOME/cmdline-tools/latest"

0 comments on commit a6fb9f9

Please sign in to comment.