-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
brew.sh
executable file
·61 lines (57 loc) · 1.77 KB
/
brew.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
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Homebrew Installer for Hosted
user=$(whoami)
mkdir -p "$HOME/.logs/"
export log="$HOME/.logs/homebrew.log"
touch "$log"
function _install() {
read -p "This application is unsupported in any way. Your slot will be reset if you ask for assistance. Do you wish to proceed? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
git clone https://github.com/Homebrew/brew $HOME/homebrew
eval "$($HOME/homebrew/bin/brew shellenv)"
brew update --force --quiet
brew analytics off
chmod -R go-w "$(brew --prefix)/share/zsh"
echo "eval \"\$(\$HOME/homebrew/bin/brew shellenv)\"" >> $HOME/.profile
echo "Brew installed. Please run 'source \$HOME/.profile' to add the application to your shell environment."
echo "Please note that this application will not be supported by any means at any point in time."
echo "This includes asking for support in Discord."
else
echo "goodbye"
exit 0
fi
}
function _remove() {
rm -rf $HOME/homebrew
}
echo "Welcome to the Homebrew installer..."
echo ""
echo "This action can cause irreperable damage."
echo "The application is not supported in any way."
echo "Use at your own risk."
echo ""
echo "What do you like to do?"
echo "Logs are stored at ${log}"
echo "install = Install Homebrew"
echo "uninstall = Completely removes Homebrew"
echo "exit = Exits Installer"
while true; do
read -r -p "Enter it here: " choice
case $choice in
"install")
_install
break
;;
"uninstall")
_remove
break
;;
"exit")
break
;;
*)
echo "Unknown Option."
;;
esac
done
exit