-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·71 lines (69 loc) · 1.96 KB
/
install
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
version="0.2.8-b"
alias_path="~/.local/zsheep/zsheep_app"
#
cr="\033[1;31m"
cg="\033[1;32m"
cb="\033[1;34m"
r="\033[0m"
# 2-17-1829
function man() {
esc=" "
echo -e "${cb}(>o.o>) zsheep usage${r}"
echo
echo -e "${esc}$ ${cb}gps${r} e2r8p9"
echo -e "${esc} Find your correction at 42Paris"
echo
echo -e "${esc}$ ${cb}sna${r} or ${cb}snails${r}"
echo -e "${esc} Do snails run"
echo
echo -e "${esc}$ ${cb}sky${r} or ${cb}askyy${r}"
echo -e "${esc} Start askyy the random night landscape"
echo
echo -e "${esc}$ ${cb}color${r}"
echo -e "${esc} Basic color scheme codes${r}"
echo
echo -e "${esc}$ ${cb}zhelp${r}"
echo -e "${esc} Display this help${r}"
echo
echo -e "${esc}https://github.com/kodpe/zsheep ${version}${r}"
echo -e "${cb}-----------------------------------------${r}"
}
if [[ ! -f ~/.zshrc ]]; then
echo fatal error .zshrc not found
echo zsheep only works with zsh currently
exit 1
fi
if ! grep -q "zsheep_${version}" ~/.zshrc
then
echo "#" >> ~/.zshrc
echo "# zsheep_${version} $(uname -s) $(date)" >> ~/.zshrc # sa uninstall
echo "# zsheep alias list" >> ~/.zshrc
echo "ZSHEEP_PATH=\"$alias_path\"" >> ~/.zshrc
echo 'alias gps="$ZSHEEP_PATH/42gps/gps"' >> ~/.zshrc
echo 'alias sna="$ZSHEEP_PATH/snails/snails"' >> ~/.zshrc
echo 'alias snails="$ZSHEEP_PATH/snails/snails"' >> ~/.zshrc
echo 'alias sky="$ZSHEEP_PATH/askyy/askyy_road"' >> ~/.zshrc
echo 'alias askyy="$ZSHEEP_PATH/askyy/askyy_road"' >> ~/.zshrc
echo 'alias color="$ZSHEEP_PATH/color/color_scheme"' >> ~/.zshrc
echo 'alias zhelp="$ZSHEEP_PATH/help/usage"' >> ~/.zshrc
echo "# zsheep_@kodpe" >> ~/.zshrc # se unistall
#
if [ -d "${HOME}/.local" ]
then
mkdir ~/.local/zsheep
else
mkdir ~/.local
mkdir ~/.local/zsheep
fi
cp -rf zsheep_app ~/.local/zsheep
cp -f LICENSE ~/.local/zsheep
echo -e "${cg}(>o.o>) zsheep installed${r}"
echo -e "${cg}(>o.o>) zsheep version ${version}${r}"
man
exec zsh
else
echo -e "${cb}(>o.o>) zsheep already installed${r}"
man
fi
exit 0