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

Fix script so it will work on windows #2

Merged
merged 3 commits into from Mar 29, 2022
Merged
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
23 changes: 7 additions & 16 deletions setup.sh
@@ -1,22 +1,13 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e

version=$1
run_bootstrap=$2

echo Installing Melos $version
echo "Installing Melos $version..."

if [ -x "$(command -v flutter)" ]
then
flutter pub global activate melos $version
elif [ -x "$(command -v dart)" ]
then
dart pub global activate melos $version
else
echo 'Error: Either dart or flutter needs to be on the PATH.' >&2
exit 1
fi
dart pub global activate melos $version

if [ "$run_bootstrap" != "false" ]
then
echo Running melos bootstrap
melos bootstrap
if [ "$run_bootstrap" != "false" ]; then
echo 'Running melos bootstrap...'
dart pub global run melos bootstrap
fi