-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.sh
40 lines (29 loc) · 877 Bytes
/
bootstrap.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
#! /bin/bash -l
export install_dir=$(cd `mktemp -d platform-install-temp.XXXX`; pwd)
function is_root { # yes, I need to repeat this... coz this needs to run
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "The installation process requires to be run as root. Consider using sudo."
false
fi
}
function fix_permissions {
chmod -R 775 /opt/platform-install
}
function pull_source {
apt-get -qq install git-core
if [ ! -e "/opt/platform-install" ]; then
git clone git://git.anixe.pl/platform-install.git
cd platform-install
else
cd /opt/platform-install && git pull
fi
}
function done_message {
echo "Temporary installation files are in $install_dir, please remove manually"
echo "Platform installation scripts are in platform-install. For updates and repair run update.sh"
}
cd /opt
is_root &&
pull_source && source ./install.sh &&
run &&
done_message