-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-linux.sh
executable file
·41 lines (31 loc) · 961 Bytes
/
install-linux.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
#!/bin/bash
# TODO this is not tested on linux
check_brew() {
if command -v brew >/dev/null 2>&1; then
echo "Homebrew is already installed."
else
echo "Homebrew is not installed. Installing Homebrew..."
install_brew
fi
}
install_brew() {
sudo apt-get update
sudo apt-get install -y build-essential procps curl file git
# install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [ $? -eq 0 ]; then
echo "Homebrew installation successful."
else
echo "Homebrew installation failed."
exit 1
fi
# add Homebrew to the PATH
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
}
echo "+++ setting up umgebung +++"
echo "+++ checking for homebrew +++"
check_brew
echo "+++ installing packages +++"
brew bundle
echo