2011-09-29 14:25:05 +02:00
#!/usr/bin/env zsh
2011-08-16 13:39:39 +02:00
echo "If you are upgrading, press ctrl + c NOW! You have 15 seconds time to cancel this. rerunning this script will overwrite your backups and it makes uninstall.sh useless."
2011-09-12 07:25:28 +02:00
sleep 15;
2011-08-16 06:48:28 +02:00
echo "Taking backups..."
2011-09-29 14:25:05 +02:00
touch ~/.zshrc # Creates .zshrc if you don't have one.
cat ~/.zshrc > ~/.zshrc.default.backup # Backups your current .zshrc
touch ~/.zsh_aliases # Creates .zsh_aliases if you don't have one.
cat ~/.zsh_aliases > ~/.zsh_aliases.default.backup # Backups your current .zsh_aliases
2011-09-29 15:41:13 +02:00
touch ~/.zshenv # Creates .zshenv
cat zshenv > ~/.zshenv.default.backup # Backs up .zsh_exports.
touch ~/.zsh_functions
2011-09-29 14:25:05 +02:00
cat ~/.zsh_functions > ~/.zsh_functions.default.backup # Backs up .zsh_functions .
2011-10-01 15:14:11 +02:00
touch ~/.zsh_tmux
cat ~/.zsh_tmux > ~/.zsh_tmux.default.backup
2011-08-16 06:48:28 +02:00
echo "Done!"
2011-09-29 14:25:05 +02:00
echo "Installing zsh_aliases."
cat zsh_aliases > ~/.zsh_aliases
echo "zsh_aliases installed."
echo "Installing zshrc."
cat zshrc > ~/.zshrc
echo "zshrc installed."
2011-09-29 15:41:13 +02:00
echo "Installing zshenv"
cat zshenv > ~/.zshenv
2011-09-29 14:25:05 +02:00
echo "zsh_exports installed."
echo "Installing zsh_functions"
cat zsh_functions > ~/.zsh_functions
echo "zsh_functions installed."
2011-10-01 15:14:11 +02:00
echo "Installing zsh_tmux..."
cat zsh_tmux > ~/.zsh_tmux
echo "zsh_tmux installed."
2011-09-29 14:25:05 +02:00
echo "Installation has completed. Now run 'source ~/.zshrc' to enable the new things."