Skip to content

Commit

Permalink
🎉 v0.1 Beta Release
Browse files Browse the repository at this point in the history
  • Loading branch information
xXDeathAbyssXx committed Nov 27, 2023
1 parent cc6f622 commit 451f746
Show file tree
Hide file tree
Showing 3 changed files with 273 additions and 299 deletions.
2 changes: 1 addition & 1 deletion src/bash/gitd.bash
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ gitd() {
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Repository size: ${COLOR_RESET}$(format_size $repo_size)"
echo ""
read -r -p "$(echo -e '\033[1;34m::\033[0m') Do you want to delete it and re-download the repository? [Y/n]: " response
read -r -p "$(echo -e '\033[1;34m::\033[0m') Proceed with installation? [Y/n]: " response
response=${response:-Y}

if [[ ! $response =~ ^[Yy]$ ]]; then
Expand Down
248 changes: 248 additions & 0 deletions src/lib/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,251 @@ format_size() {
echo "$((size_in_kb / 1048576)) GB"
fi
}

install_pnpm() {
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing pnpm for macOS...${COLOR_RESET}"
brew install pnpm
;;
Linux)
if command -v apt-get &>/dev/null; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing pnpm for Debian/Ubuntu...${COLOR_RESET}"
sudo apt-get install pnpm
elif command -v dnf &>/dev/null; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing pnpm for Fedora...${COLOR_RESET}"
sudo dnf install pnpm
elif command -v yum &>/dev/null; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing pnpm for CentOS...${COLOR_RESET}"
sudo yum install pnpm
elif command -v pacman &>/dev/null; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing pnpm for Arch Linux...${COLOR_RESET}"
sudo pacman -S pnpm
elif command -v zypper &>/dev/null; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing pnpm for OpenSUSE...${COLOR_RESET}"
sudo zypper install pnpm
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported package manager. Please install pnpm manually.${COLOR_RESET}"
exit 1
fi
;;
esac
}

install_yarn() {
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing yarn for macOS...${COLOR_RESET}"
brew install yarn
;;
Linux)
if [ -f /etc/lsb-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing yarn for Ubuntu/Debian...${COLOR_RESET}"
sudo apt-get install yarn
elif [ -f /etc/fedora-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing yarn for Fedora...${COLOR_RESET}"
sudo dnf install yarn
elif [ -f /etc/centos-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing yarn for CentOS...${COLOR_RESET}"
sudo yum install yarn
elif [ -f /etc/arch-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing yarn for Arch Linux...${COLOR_RESET}"
sudo pacman -S yarn
elif [ -f /etc/SuSE-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing yarn for OpenSUSE...${COLOR_RESET}"
sudo zypper install yarn
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install yarn manually.${COLOR_RESET}"
exit 1
fi
;;
*)
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install yarn manually.${COLOR_RESET}"
exit 1
;;
esac
}

install_npm(){
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing npm for macOS...${COLOR_RESET}"
brew install npm
;;
Linux)
if [ -f /etc/lsb-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing npm for Ubuntu/Debian...${COLOR_RESET}"
sudo apt-get install npm
elif [ -f /etc/fedora-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing npm for Fedora...${COLOR_RESET}"
sudo dnf install npm
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install npm manually.${COLOR_RESET}"
exit 1
fi
;;
*)
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install npm manually.${COLOR_RESET}"
exit 1
;;
esac
}

install_ruby(){
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Ruby for macOS...${COLOR_RESET}"
brew install ruby
;;
Linux)
if [ -f /etc/lsb-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Ruby for Ubuntu/Debian...${COLOR_RESET}"
sudo apt-get install ruby
elif [ -f /etc/fedora-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Ruby for Fedora...${COLOR_RESET}"
sudo dnf install ruby
elif [ -f /etc/centos-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Ruby for CentOS...${COLOR_RESET}"
sudo yum install ruby
elif [ -f /etc/arch-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Ruby for Arch Linux...${COLOR_RESET}"
sudo pacman -S ruby
elif [ -f /etc/SuSE-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Ruby for OpenSUSE...${COLOR_RESET}"
sudo zypper install ruby
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install Ruby manually.${COLOR_RESET}"
exit 1
fi
;;
esac
}

install_java(){
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Java for macOS...${COLOR_RESET}"
brew install openjdk
;;
Linux)
if [ -f /etc/lsb-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Java for Ubuntu/Debian...${COLOR_RESET}"
sudo apt-get install openjdk-11-jdk
elif [ -f /etc/fedora-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Java for Fedora...${COLOR_RESET}"
sudo dnf install java-11-openjdk
elif [ -f /etc/centos-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Java for CentOS...${COLOR_RESET}"
sudo yum install java-11-openjdk
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install Java manually.${COLOR_RESET}"
exit 1
fi
;;
*)
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install Java manually.${COLOR_RESET}"
exit 1
;;
esac
}

install_go(){
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Go for macOS...${COLOR_RESET}"
brew install go
;;
Linux)
if [ -f /etc/lsb-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Go for Ubuntu/Debian...${COLOR_RESET}"
sudo apt-get install golang
elif [ -f /etc/fedora-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Go for Fedora...${COLOR_RESET}"
sudo dnf install golang
elif [ -f /etc/centos-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing Go for CentOS...${COLOR_RESET}"
sudo yum install golang
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install Go manually.${COLOR_RESET}"
exit 1
fi
;;
*)
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install Go manually.${COLOR_RESET}"
exit 1
;;
esac
}

install_gcc(){
case $(uname -s) in
Darwin)
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing GCC for macOS...${COLOR_RESET}"
brew install gcc
;;
Linux)
if [ -f /etc/lsb-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing GCC for Ubuntu/Debian...${COLOR_RESET}"
sudo apt-get install gcc
elif [ -f /etc/fedora-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing GCC for Fedora...${COLOR_RESET}"
sudo dnf install gcc
elif [ -f /etc/centos-release ]; then
echo ""
echo -e "${COLOR_CYAN}${INFO_MARK} Installing GCC for CentOS...${COLOR_RESET}"
sudo yum install gcc
else
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install GCC manually.${COLOR_RESET}"
exit 1
fi
;;
*)
echo ""
echo -e "${COLOR_RED}${CROSS_MARK} Unsupported operating system. Please install GCC manually.${COLOR_RESET}"
exit 1
;;
esac
}
Loading

0 comments on commit 451f746

Please sign in to comment.