-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetch-flutter.sh
More file actions
executable file
·37 lines (25 loc) · 854 Bytes
/
fetch-flutter.sh
File metadata and controls
executable file
·37 lines (25 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -eu
# Folders
PROJECT_DIR=$(pwd)
WORKING_DIR="$PROJECT_DIR/sdk"
FLUTTER_DIR="$WORKING_DIR/flutter"
# Versions
FLUTTER_VERSION="3.27.1"
# Make sure WORKING_DIR directory exists
mkdir -p "$WORKING_DIR" && cd "$WORKING_DIR"
# Fetch the tar.xz archive
FILENAME="flutter_linux_${FLUTTER_VERSION}-stable.tar.xz"
FETCH_URL="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/${FILENAME}"
echo "Flutter SDK location: $FETCH_URL"
echo "Begin Download of Flutter SDK archive: ${FILENAME}"
wget --continue --tries=10 "$FETCH_URL"
echo "Begin Extract Flutter SDK"
# Make sure FLUTTER_DIR does NOT exists
if [ -d "$FLUTTER_DIR" ]; then rm -Rf "$FLUTTER_DIR"; fi
# Extract Archive
tar -xvf "${FILENAME}"
echo
echo "Flutter Download and Extraction Complete"
echo "Flutter SDK location: ${FLUTTER_DIR}"
echo