-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·63 lines (50 loc) · 1.79 KB
/
start.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
62
63
#!/bin/bash
# Source the colors file
source ./scripts/colours.sh
# Function to handle errors and exit, otherwise the script would continue running even if there is an exit 1
exit_with_error() {
echo "${RED}Something went wrong.${NC} Exiting..."
exit 1
}
read -p "Would you like to customize your ${GREEN}Terminal${NC}? (Y/N): " choice
# Convert the choice to uppercase
choice=$(echo "$choice" | tr '[:lower:]' '[:upper:]')
# Check the user's choice
if [ "$choice" == "Y" ]; then
echo "${GREEN}Continuing with the script...${NC}"
elif [ "$choice" == "N" ]; then
echo "${GREEN}Have a nice day${NC}"
exit 0
else
exit_with_error
fi
# Update the apt package list before installing new packages
sudo apt-get update
./scripts/zsh.sh || exit_with_error
echo "" # Add a new line for legibility
./scripts/starship.sh || exit_with_error
echo ""
./scripts/tools.sh || exit_with_error
echo ""
# Ask if Homebrew should be installed
read -p "Would you like to install ${MAGENTA}Homebrew${NC}? (Y/N): " brew_choice
# Convert the choice to uppercase
brew_choice=$(echo "$brew_choice" | tr '[:lower:]' '[:upper:]')
# Check the user's choice
if [ "$brew_choice" == "Y" ]; then
echo "${GREEN}Installing Homebrew...${NC}"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || exit_with_error
elif [ "$brew_choice" == "N" ]; then
echo "${GREEN}Skipping Homebrew installation${NC}"
else
exit_with_error
fi
./scripts/newsboat.sh || exit_with_error
echo ""
./scripts/rainbow.sh "Customization Complete" || exit_with_error
echo "${YELLOW}Remember to go over the checklist in the README.md file${NC}"
echo "${CYAN}You should probably restart your terminal now to avoid bugs${NC}"
# Start zsh if it is installed
if command -v zsh &>/dev/null; then
exec zsh -l
fi