-
Notifications
You must be signed in to change notification settings - Fork 1
/
flutter_init.sh
executable file
·48 lines (44 loc) · 2 KB
/
flutter_init.sh
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
38
39
40
41
42
43
44
45
46
47
48
# **************************************************************************** #
# #
# ::: :::::::: #
# flutter_init.sh :+: :+: :+: #
# +:+ +:+ +:+ #
# By: yel-hadd <yel-hadd@mail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/11/29 18:58:43 by yel-hadd #+# #+# #
# Updated: 2022/12/30 19:49:23 by yel-hadd ### ########.fr #
# #
# **************************************************************************** #
# Starter Variables
FLUTTER_DL_LINK="https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.3.9-stable.zip"
USER=$(whoami)
# Download & Extract Dart & Flutter SDKs
if [ ! -d "/goinfre/$USER/flutter" ]; then
mkdir -p "/goinfre/$USER/flutter"
clear
echo "Please wait while Dart & Flutter SDKs are being downloaded"
echo "Please do not close terminal !\n"
curl "$FLUTTER_DL_LINK" -o "/goinfre/$USER/flutter.zip"
echo ""
echo "Please wait while Dart & Flutter SDKs are being installed"
echo "Please do not close terminal !\n"
unzip -q "/goinfre/$USER/flutter.zip" -d "/goinfre/$USER/"
rm -f "/goinfre/$USER/flutter.zip"
echo "Flutter & Dart SDKs Have Been Installed Successfuly !"
fi
# Create Alias Flutter
if grep -Fq "flutter='/goinfre/$USER/flutter/bin/flutter'" ~/.zshrc
then
:
else
echo "alias flutter='/goinfre/$USER/flutter/bin/flutter'" >> ~/.zshrc
echo "Created Alias For Flutter"
fi
# Create Alias for Dart
if grep -Fq "dart='/goinfre/$USER/flutter/bin/dart'" ~/.zshrc
then
:
else
echo "alias dart='/goinfre/$USER/flutter/bin/dart'" >> ~/.zshrc
echo "Created Alias For Dart"
fi