Skip to content

Commit

Permalink
Fix script so it will work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
luanpotter committed Mar 26, 2022
1 parent dc5c5b5 commit 5a0e853
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions setup.sh
Expand Up @@ -2,21 +2,20 @@
version=$1
run_bootstrap=$2

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
if [ -x "$(command -v flutter)" ]; then
exec=flutter
elif [ -x "$(command -v dart)" ]; then
exec=dart
else
echo 'Error: Either dart or flutter needs to be on the PATH.' >&2
exit 1
fi

if [ "$run_bootstrap" != "false" ]
then
echo Running melos bootstrap
melos bootstrap
echo Installing Melos $version via $exec

$exec pub global activate melos $version

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

0 comments on commit 5a0e853

Please sign in to comment.