-
Notifications
You must be signed in to change notification settings - Fork 14
/
online-install
executable file
·41 lines (33 loc) · 1.07 KB
/
online-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
#!/bin/bash
sudo=""
installer="yum"
Ubuntu_check=`cat /etc/*-release 2> /dev/null | head -1 |grep Ubuntu | awk -F '=' '{print $2}'`
Uname=`uname`
if [[ "$Ubuntu_check" == "Ubuntu" ]]; then
installer="apt-get"
elif [[ "$Ubuntu_check" == "LinuxMint" ]] ; then
installer="apt-get"
elif [[ "$Uname" == "Darwin" ]]; then
installer="brew"
else
installer="yum"
fi
if [[ -d "$HOME/bin" ]]; then
if [[ `(echo ":$PATH:" | grep -q ":~/bin:" || echo ":$PATH:" | grep -q ":$HOME/bin:")` ]] ; then
target="$HOME/bin/$bin_name"
fi
elif [[ -d "/usr/bin" ]]; then
if [[ `(echo ":$PATH:" | grep -q ":/usr/bin:")` ]]; then
target="/usr/bin/$bin_name"
if [[ ! -d /usr/bin ]]; then
sudo=sudo
echo "Notice!: You may be asked for administrator password to save the file in /usr/bin directory"
fi
fi
fi
$sudo sh -c "curl -sL http://j.mp/zinst_ > /usr/bin/zinst; chmod 755 /usr/bin/zinst"
if [[ -e $sudo ]];then
$installer install sudo -y
fi
echo "[ --------- Install has been done !! enjoy! :) -------------- ]"
zinst i server_default_setting-1.3.2.zinst