-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
26 lines (26 loc) · 1.02 KB
/
install.sh
File metadata and controls
26 lines (26 loc) · 1.02 KB
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
sudo cp target/release/gitlicense /usr/bin
echo "Gitlicense binary was succesfully installed"
read -p "Would you like to add gl alias for gitlicense?(y/n)" input
if [ "$input" = "y" ];then
if [ "$SHELL" = "/usr/bin/bash" ]; then
echo 'alias gl="gitlicense" ' >> $HOME/.bashrc
source $HOME/.bashrc
echo "Alias was succesfully added to your bash config"
elif [ "$SHELL" = "/usr/bin/zsh" ]; then
echo 'alias gl="gitlicense" ' >> $HOME/.zshrc
source $HOME/.zshrc
echo "Alias was succesfully added to your zsh config"
elif [ "$SHELL" = "/usr/bin/sh" ];then
echo 'alias gl="gitlicense" ' >> $HOME/.profile
source $HOME/.profile
echo "Alias was succesfully added to your sh profile,
but consider moving to a more modern shell"
# Add support for nushell
else
echo "Your shell is not supported"
fi
elif [ "$input" = "n" ];then
echo "Ok, remember that you can always do it yourself"
else
echo "This option is not supported"
fi