Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ command_exists() {

# Detect the OS using uname -s
OS=$(uname -s)
if [ "$OS" = "Linux" ]; then
if grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then
OS="AmazonLinux"
fi
fi

# Function to install Zsh
install_zsh() {
echo "Installing Zsh..."
if ! command_exists zsh; then
if [ "$OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y zsh
elif [ "$OS" = "AmazonLinux" ]; then
sudo yum update && sudo yum install -y zsh
elif [ "$OS" = "Darwin" ]; then
brew install zsh
fi
Expand Down Expand Up @@ -54,6 +61,8 @@ install_git() {
if ! command_exists git; then
if [ "$OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y git
elif [ "$OS" = "AmazonLinux" ]; then
sudo yum update && sudo yum install -y git
elif [ "$OS" = "Darwin" ]; then
brew install git
fi
Expand Down Expand Up @@ -92,6 +101,8 @@ install_neovim() {
if ! command_exists nvim; then
if [ "$OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y neovim
elif [ "$OS" = "AmazonLinux" ]; then
sudo yum update && sudo yum install -y neovim
elif [ "$OS" = "Darwin" ]; then
brew install neovim
fi
Expand All @@ -106,6 +117,8 @@ install_tmux() {
if ! command_exists tmux; then
if [ "$OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y tmux
elif [ "$OS" = "AmazonLinux" ]; then
sudo yum update && sudo yum install -y tmux
elif [ "$OS" = "Darwin" ]; then
brew install tmux
fi
Expand Down Expand Up @@ -140,6 +153,8 @@ install_stow() {
if ! command_exists stow; then
if [ "$OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y stow
elif [ "$OS" = "AmazonLinux" ]; then
sudo yum update && sudo yum install -y stow
elif [ "$OS" = "Darwin" ]; then
brew install stow
fi
Expand All @@ -159,6 +174,8 @@ install_additional_deps () {
if [ "$OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y tree gh snapd
sudo snap install tldr
elif [ "$OS" = "AmazonLinux" ]; then
sudo yum update && sudo yum install -y tree gh
elif [ "$OS" = "Darwin" ]; then
brew install tree gh tldr
fi
Expand Down