Last active
November 17, 2020 12:51
-
-
Save KoheiKanagu/9917fd02e5b33afd9f072afc42a73de1 to your computer and use it in GitHub Desktop.
fvm使って初回のFlutterの環境構築する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
# fvm is https://github.com/leoafarias/fvm | |
# https://flutter.dev/docs/get-started/install/macos から最新のものを参照すること | |
FLUTTER_ZIP="flutter_macos_1.22.4-stable.zip" | |
curl -O "https://storage.googleapis.com/flutter_infra/releases/stable/macos/$FLUTTER_ZIP" | |
unzip $FLUTTER_ZIP | |
flutter/bin/flutter pub global activate fvm | |
echo ' | |
bashrc or zshrc or anything else. | |
export PATH="$PATH:$HOME/fvm/default/bin" | |
export PATH="$PATH:$HOME/fvm/default/bin/cache/dart-sdk/bin" | |
' | |
export PATH="$PATH":"`pwd`/flutter/.pub-cache/bin" | |
export PATH="$PATH":"`pwd`/flutter/bin/cache/dart-sdk/bin" | |
fvm install beta | |
fvm use beta --global | |
flutter precache | |
fvm install stable | |
fvm use stable --global | |
flutter precache | |
flutter pub global activate fvm | |
rm -rf flutter | |
rm -rf $FLUTTER_ZIP | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment