-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd_zsh_profile
executable file
·39 lines (37 loc) · 1.11 KB
/
add_zsh_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/zsh
# Wolfthefallen's zsh profile setup.
# used to copy the zsh profile for initial setup.
# /etc/zsh is for ubuntu 14.04 installs
# /etc/zshenv is for fedora
# Wolfthefallen
if [[ -d /etc/zsh ]]; then
if [[ -w /etc/zsh/zshenv ]]; then
cp ./zsh/zshenv /etc/zsh/zshenv
cp ./zsh/zshrc /etc/zsh/zshrc
cp ./zsh/zshrc_profile_default $HOME/.zshrc
else print "no write access please run as root"
fi
elif [[ -f /etc/zshenv ]]; then
if [[ -w /etc/zshenv ]]; then
cp ./zsh/zshenv /etc/zshenv/zshenv
cp ./zsh/zshrc /etc/zshenv/zshrc
cp ./zsh/zshrc_profile_default $HOME/.zshrc
else print "no write access please run as root"
fi
fi
if [[ -w /usr/local/share/zsh/site-functions ]]; then
cp -r ./zsh/site-functions /usr/local/share/zsh/site-functions
else print "cannot copy site-functions please make sure you have write access"
fi
if [[ -d $HOME/.fonts ]]; then
if [[ -w $HOME/.fonts ]]; then
cp ./fonts/* $HOME/.fonts/
fc-cache -fv $HOME/.fonts
else print "cannot copy fonts to $HOME/.fonts"
fi
else;
mkdir $HOME/.fonts
mkdir $HOME/.fontconfig
cp ./fonts/* $HOME/.fonts/
fc-cache -fv $HOME/.fonts
fi