-
Notifications
You must be signed in to change notification settings - Fork 10
/
install
executable file
·51 lines (42 loc) · 1.5 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
#!/bin/bash -li
# Makes the shell login and interactive
echo "
Are you ready to install po-util?
Please be sure to follow any prompts or instructions
during the installation process."
read -rp "ENTER / CTRL-C: "
echo "
Continuing installation...
"
if [[ "$USER" != "${USER/ /}" ]]; then
echo "$(tput setaf 1)$(tput bold)WARNING: Your username contains space(s), something which is not compatible for po.$(tput sgr0)"
exit
fi
if alias po &>/dev/null ; then
echo "$(tput setaf 1)$(tput bold)WARNING: You have an alias named 'po'. Use 'unalias po' to remove the alias.$(tput sgr0)"
exit
fi
if [[ $(uname -s) == "Darwin" ]]; then
if hash brew 2>/dev/null;
then
echo "Homebrew is installed. Continuing..."
else
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew update
brew tap nrobinson2000/NewPo
brew install NewPo
po install
fi
if [[ $(uname -s) == "Linux" ]]; then
sudo curl -fsSLo /usr/local/share/po-common https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-common
sudo curl -fsSLo /usr/local/share/po-linux https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-linux
sudo curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po
sudo chmod +x /usr/local/bin/po
po install
fi
echo "po-util has been installed on your system.
If you are unsure about how to start with po-util
please check out the quickstart guide:
https://docs.po-util.com/quick-start.html
"