diff --git a/bin/install_android_sdk b/bin/install_android_sdk new file mode 100644 index 0000000..3ba1b69 --- /dev/null +++ b/bin/install_android_sdk @@ -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"