-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
executable file
·42 lines (34 loc) · 1.22 KB
/
install.sh
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
# !/bin/bash
export PATH=$PATH:$HOME/.git-semantic-commits:$PATH
bashrc=$HOME"/.bashrc"
zshrc=$HOME"/.zshrc"
packageDir=$(pwd)
if [ -f "$bashrc" ]
then
echo "Installing on Bash"
dir="export PATH=$PATH:$HOME/.git-semantic-commits:$PATH"
echo "" >> $zshrc
echo "#git-semantic-commits (delete this lines to 'uninstall' commands)" >> $bashrc
echo $dir >> $bashrc
fi
if [ -f "$zshrc" ]
then
echo "Installing on ZSH"
dir="export PATH=$PATH:$packageDir:$PATH"
echo "" >> $zshrc
echo "#git-semantic-commits (delete this lines to 'uninstall' commands)" >> $zshrc
echo $dir >> $zshrc
fi
echo "-------------------------------------------------"
echo "╔═╗╦╔╦╗ ╔═╗╔═╗╔╦╗╔═╗╔╗╔╔╦╗╦╔═╗ ╔═╗╔═╗╔╦╗╔╦╗╦╔╦╗
║ ╦║ ║ ╚═╗║╣ ║║║╠═╣║║║ ║ ║║ ║ ║ ║║║║║║║║ ║
╚═╝╩ ╩ ╚═╝╚═╝╩ ╩╩ ╩╝╚╝ ╩ ╩╚═╝ ╚═╝╚═╝╩ ╩╩ ╩╩ ╩ "
echo ""
echo "Installation complete!"
echo ""
echo "Follow the instructions below:"
echo ""
echo "For Bash run: source ~/.bashrc"
echo "For ZSH run: source ~/.zshrc"
echo ""
echo "Or restart your terminal!"