-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup
executable file
·46 lines (35 loc) · 1.48 KB
/
setup
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
#!/bin/sh
# don't start this script as root, run as a normal user. We need to run some actions as $USER, and others as root.
#
numargs=$#
this_script=$0
username=$1
. ./source_me
echo "numargs = $numargs"
if [ "$numargs" = 0 ]; then
username=$USER
echo "re-running script as root..."
sudo ./$this_script $USER # re-run this script as root, passing in the username of the original caller
echo "finished running as root."
exit $?
fi
required_packages="build-essential perl python git "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev flex bison gperf libicu-dev libxslt-dev ruby libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpq5 libpq-dev libboost-serialization1.48 postgresql-client-9.1"
optional_packages="synaptic cscope openssh-server"
apt-get install -y $required_packages $optional_packages
if [ "$?" -ne 0 ]; then
exit $?
fi
sudo -u $username mkdir -p $BASE_DIR
cd $BASE_DIR/openmining
# qt5
########################################################################################################
./setup_qt5 $username
# qt3d
########################################################################################################
./setup_qt3d $username
# qwtplot3d
########################################################################################################
./setup_qwtplot3d $username
# openmining
########################################################################################################
./setup_openmining $username