Upgrade easyzsh
This commit is contained in:
44
install.sh
44
install.sh
@@ -48,35 +48,35 @@ install_packages() {
|
||||
echo "Homebrew is not installed. Installing Homebrew..."
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
brew install zsh git wget fontconfig autojump
|
||||
brew install zsh git wget fontconfig
|
||||
;;
|
||||
ubuntu|debian)
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y zsh git wget fontconfig autojump
|
||||
sudo apt-get install -y zsh git wget fontconfig
|
||||
;;
|
||||
fedora)
|
||||
sudo dnf install -y zsh git wget fontconfig autojump
|
||||
sudo dnf install -y zsh git wget fontconfig
|
||||
;;
|
||||
centos|rhel)
|
||||
sudo yum install -y zsh git wget fontconfig autojump
|
||||
sudo yum install -y zsh git wget fontconfig
|
||||
;;
|
||||
arch|manjaro)
|
||||
sudo pacman -Syu --noconfirm zsh git wget fontconfig autojump
|
||||
sudo pacman -Syu --noconfirm zsh git wget fontconfig
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported operating system. Please install zsh, git, wget, fontconfig, and autojump manually."
|
||||
echo "Unsupported operating system. Please install zsh, git, wget, and fontconfig manually."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check if required packages are installed, if not, install them
|
||||
if command -v zsh &> /dev/null && command -v git &> /dev/null && command -v wget &> /dev/null && command -v fc-cache &> /dev/null && command -v autojump &> /dev/null; then
|
||||
echo -e "ZSH, Git, wget, fontconfig, and autojump are already installed\n"
|
||||
if command -v zsh &> /dev/null && command -v git &> /dev/null && command -v wget &> /dev/null && command -v fc-cache &> /dev/null; then
|
||||
echo -e "ZSH, Git, wget, and fontconfig are already installed\n"
|
||||
else
|
||||
echo "Installing required packages..."
|
||||
install_packages
|
||||
echo -e "zsh, wget, git, fontconfig, and autojump Installed\n"
|
||||
echo -e "zsh, wget, git, and fontconfig Installed\n"
|
||||
fi
|
||||
|
||||
if [ -f ~/.gitconfig.backup ]; then
|
||||
@@ -95,7 +95,7 @@ fi
|
||||
|
||||
# echo -e "The setup will be installed in '~/.config/ezsh'\n"
|
||||
# echo -e "Place your personal zshrc config files under '~/.config/ezsh/zshrc/'\n"
|
||||
# mkdir -p ~/.config/ezsh/zshrc
|
||||
# mkdir -p ~/.config/ezsh/zshrc # PLACE YOUR ZSHRC CONFIGURATIONS OVER THERE
|
||||
|
||||
# if [ -d ~/.quickzsh ]; then
|
||||
# echo -e "\n PREVIOUS SETUP FOUND AT '~/.quickzsh'. PLEASE MANUALLY MOVE ANY FILES YOU'D LIKE TO '~/.config/ezsh' \n"
|
||||
@@ -115,11 +115,11 @@ else
|
||||
fi
|
||||
|
||||
# cp -f .zshrc ~/
|
||||
# cp -f ezshrc.zsh ~/.config/ezsh/
|
||||
echo -e "Downloaded the remote .zshrc configuration\n"
|
||||
wget -q "https://git.miomio.moe/mio/easyzsh/raw/branch/master/.zshrc" -O ~/.zshrc
|
||||
# cp -f ezshrc.zsh ~/.config/ezsh/
|
||||
# cp -f p10k.zsh ~/.config/ezsh/
|
||||
|
||||
|
||||
# mkdir -p ~/.config/ezsh/zshrc # PLACE YOUR ZSHRC CONFIGURATIONS OVER THERE
|
||||
mkdir -p ~/.cache/zsh/ # this will be used to store .zcompdump zsh completion cache files which normally clutter $HOME
|
||||
mkdir -p ~/.fonts # Create .fonts if doesn't exist
|
||||
|
||||
@@ -201,13 +201,13 @@ else
|
||||
echo -e "Marker Installation Had Issues\n"
|
||||
fi
|
||||
|
||||
# # if git clone --depth 1 https://github.com/todotxt/todo.txt-cli.git ~/.config/ezsh/todo; then :
|
||||
# # else
|
||||
# # cd ~/.config/ezsh/todo && git fetch --all && git reset --hard origin/master
|
||||
# # fi
|
||||
# # mkdir ~/.config/ezsh/todo/bin ; cp -f ~/.config/ezsh/todo/todo.sh ~/.config/ezsh/todo/bin/todo.sh # cp todo.sh to ./bin so only it is included in $PATH
|
||||
# # #touch ~/.todo/config # needs it, otherwise spits error , yeah a bug in todo
|
||||
# # ln -s ~/.config/ezsh/todo ~/.todo
|
||||
# if git clone --depth 1 https://github.com/todotxt/todo.txt-cli.git ~/.config/ezsh/todo; then :
|
||||
# else
|
||||
# cd ~/.config/ezsh/todo && git fetch --all && git reset --hard origin/master
|
||||
# fi
|
||||
# mkdir ~/.config/ezsh/todo/bin ; cp -f ~/.config/ezsh/todo/todo.sh ~/.config/ezsh/todo/bin/todo.sh # cp todo.sh to ./bin so only it is included in $PATH
|
||||
# #touch ~/.todo/config # needs it, otherwise spits error , yeah a bug in todo
|
||||
# ln -s ~/.config/ezsh/todo ~/.todo
|
||||
# if [ ! -L ~/.config/ezsh/todo/bin/todo.sh ]; then
|
||||
# echo -e "Installing todo.sh in ~/.config/ezsh/todo\n"
|
||||
# mkdir -p ~/.config/ezsh/bin
|
||||
@@ -219,7 +219,6 @@ fi
|
||||
# else
|
||||
# echo -e "todo.sh is already instlled in ~/.config/ezsh/todo/bin/\n"
|
||||
# fi
|
||||
|
||||
if [ "$cp_hist_flag" = true ]; then
|
||||
echo -e "\nCopying bash_history to zsh_history\n"
|
||||
if command -v python &>/dev/null; then
|
||||
@@ -249,7 +248,8 @@ else
|
||||
echo -e "Installation complete, exit terminal and enter a new zsh session"
|
||||
echo -e "In a new zsh session manually run: build-fzf-tab-module"
|
||||
else
|
||||
echo -e "Something went wrong"
|
||||
echo -e "Something is wrong"
|
||||
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
Reference in New Issue
Block a user