-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·45 lines (36 loc) · 879 Bytes
/
install
File metadata and controls
executable file
·45 lines (36 loc) · 879 Bytes
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
#!/bin/sh
RED='\033[0;31m'
GRE='\033[32m' # No Color
YEL='\033[33m'
NC='\033[0m'
echo "Check dependency"
# check dependency
res="$(gem list '^commander$' -i)"
if [ ${res} = 'false' ];
then
echo "${YEL}The dependency gem ${RED} commander ${YEL} not installed, try to install it:${NC}"
gem install commander
if [ $? -eq 1 ];
then
echo "${YEL}Permission Denied, try to insttall ${RED}sudo${NC}"
sudo gem install commander
fi
fi
target_path="/usr/local/bin/quickpod"
echo "Install quickpod"
if [ -e ${target_path} ]
then
echo 'delete old one'
sudo rm ${target_path}
fi
sudo cp ./lib/quickpod ${target_path}
# if [ -n"`$SHELL -c 'echo $ZSH_VERSION'`" ]; then
# # assume Zsh
# echo 'You are using zsh!'
# hash -r
# elif [ -n"`$SHELL -c 'echo $BASH_VERSION'`" ]; then
# # assume Bash
# hash -r
# fi
hash -r
echo "${GRE}Success Installed quickpod!"