Skip to content

Commit

Permalink
adding a flutter install script
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlapao committed Dec 12, 2023
1 parent 1d61257 commit 18be7e5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions flutter/linux/install-latest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Check if Flutter is already installed
if command -v flutter &> /dev/null; then
echo "Flutter is already installed."
exit 0
fi

# Download the latest Flutter SDK
echo "Downloading Flutter SDK..."
git clone https://github.com/flutter/flutter.git -b stable --depth 1 ~/.flutter

# Add Flutter to the PATH
echo "Adding Flutter to the PATH..."
echo 'export PATH="$PATH:$HOME/.flutter/bin"' >> ~/.bashrc
source ~/.bashrc

# Run Flutter doctor to verify the installation
echo "Verifying Flutter installation..."
flutter doctor

echo "Flutter installation completed successfully."

0 comments on commit 18be7e5

Please sign in to comment.