This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
install-scripts/pkg-setup/zsh.sh

25 lines
546 B
Bash
Raw Normal View History

2020-03-19 19:47:25 +00:00
#!/bin/sh
set -e
if command -v apt-get ; then
apt-get -y install zsh git
else
echo "Error - no package installer found."
exit 1
fi
# clone configuration
mkdir -p /home/"$_user"/.config
cd /home/"$_user"
rm -Rf .config/zsh
2020-03-20 14:18:56 +00:00
su "$_user" -c 'git clone https://git.rayelliott.dev/dots/zsh.git .config/zsh'
su "$_user" -c 'git clone https://github.com/tarjoilija/zgen.git .config/zsh/zgen'
su "$_user" -c 'ln -bfs .config/zsh/zshrc .zshrc'
2020-03-19 19:47:25 +00:00
# set interactive shell
_zsh=$(command -v zsh)
if [ -f "$_zsh" ] ; then
2020-03-20 14:18:56 +00:00
chsh "$_user" -s "$_zsh"
2020-03-19 19:47:25 +00:00
fi