-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.sh
executable file
·36 lines (31 loc) · 1.56 KB
/
uninstall.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
#!/bin/bash
# Remove environment variable from their respective shells
if [ -f ~/.bashrc ]; then
sed -i '/export ANDROID_HOME=$HOME\/Development\/android/d' ~/.bashrc
sed -i '/export PATH=$ANDROID_HOME\/cmdline-tools\/latest\/bin:$PATH/d' ~/.bashrc
sed -i '/export PATH=$ANDROID_HOME\/emulator:$PATH/d' ~/.bashrc
sed -i '/export PATH=$ANDROID_HOME\/platform-tools:$PATH/d' ~/.bashrc
sed -i '/export PATH=$HOME\/Development\/flutter\/bin:$PATH/d' ~/.bashrc
fi
if [ -f ~/.zshrc ]; then
sed -i '/export ANDROID_HOME=$HOME\/Development\/android/d' ~/.zshrc
sed -i '/export PATH=$ANDROID_HOME\/cmdline-tools\/latest\/bin:$PATH/d' ~/.zshrc
sed -i '/export PATH=$ANDROID_HOME\/emulator:$PATH/d' ~/.zshrc
sed -i '/export PATH=$ANDROID_HOME\/platform-tools:$PATH/d' ~/.zshrc
sed -i '/export PATH=$HOME\/Development\/flutter\/bin:$PATH/d' ~/.zshrc
fi
if [ -f ~/.config/fish/config.fish ]; then
sed -i '/set -x ANDROID_HOME $HOME\/Development\/android/d' ~/.config/fish/config.fish
sed -i '/fish_add_path $HOME\/Development\/flutter\/bin/d' ~/.config/fish/config.fish
sed -i '/fish_add_path $ANDROID_HOME\/cmdline-tools\/latest\/bin/d' ~/.config/fish/config.fish
sed -i '/fish_add_path $ANDROID_HOME\/emulator/d' ~/.config/fish/config.fish
sed -i '/fish_add_path $ANDROID_HOME\/platform-tools/d' ~/.config/fish/config.fish
fi
# Remove the Flutter installation
if [ -d ~/Development/flutter ]; then
rm -rf ~/Development/flutter
fi
# Remove the Android SDK installation
if [ -d ~/Development/android ]; then
rm -rf ~/Development/android
fi