psoxizsh/fresh-system

19 lines
399 B
Plaintext
Raw Normal View History

2018-06-14 11:08:45 +00:00
#! /bin/zsh
2017-12-18 15:20:27 +00:00
(
2018-06-14 10:29:37 +00:00
cd ~
2018-06-14 11:08:45 +00:00
[[ ! -e ~/.zshrc ]] && touch ~/.zshrc
install -v -m 0700 -d ~/.ssh
2018-06-14 11:08:45 +00:00
grep -E '^source (/etc/psoxizsh|~/.psoxizsh)/zshrc' ~/.zshrc 2>/dev/null >/dev/null
if [[ $? -ne 0 ]]
2018-06-14 10:29:37 +00:00
then
if [[ -d ~/.psoxizsh ]]
then
echo 'source ~/.psoxizsh/zshrc' >>~/.zshrc
elif [[ -d /etc/psoxizsh ]]
then
2018-06-14 11:08:45 +00:00
echo 'source /etc/psoxizsh/zshrc' >>~/.zshrc
2018-06-14 10:29:37 +00:00
fi
fi
2017-12-13 13:08:26 +00:00
)
2018-06-14 10:29:37 +00:00