react-native-navigation的迁移库

installAndroidSDK.sh 660B

1234567891011121314151617181920
  1. #!/bin/bash -e
  2. export ANDROID_HOME=$HOME/android-sdk-macosx
  3. export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  4. # fix for https://code.google.com/p/android/issues/detail?id=223424
  5. mkdir -p ~/.android
  6. # download android SDK
  7. echo "Downloading Android SDK"
  8. curl --location https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip | tar -x -z -C $HOME
  9. # copy licenses
  10. echo "Copying Android licenses"
  11. mkdir -p "${ANDROID_HOME}"/licenses
  12. scriptdir=$_
  13. [[ $scriptdir != $0 ]] && echo "Script is being sourced" || echo "Script is being run"
  14. echo "\$BASH_SOURCE ${BASH_SOURCE[@]}"
  15. cp "$scriptdir/android-sdk-licenses/*" "${ANDROID_HOME}"/licenses