-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
54 lines (47 loc) · 1.2 KB
/
install.sh
File metadata and controls
54 lines (47 loc) · 1.2 KB
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
52
53
54
#!/bin/sh
# This script run for SysnovaFeed
JAVA=$(which java)
if [ ! -x "${JAVA}" ]; then
echo no java found. Install Java version 1.7.0 or higher
exit
else
# export JAVA_VERSION
JAVA_VERSION=`java -version 2>&1 |awk 'NR==1{ gsub(/"/,""); print $3 }'`
JAVA_VER=$(java -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/\1\2/p;')
if [ "$JAVA_VER" -ge 17 ]; then
echo $JAVA_VERSION
else
echo "Error: Java version is too low. At least Java >= 1.7.0 needed.";
exit
fi
fi
if [ $(dpkg-query -W -f='${Status}' libglpk-java 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
echo Installing gplk..........
sudo apt-get install libglpk-java -y
status=$?
if [ $status != 0 ]; then
echo glpk Installation failed, exiting.
exit
fi
else
echo "libglpk already installed";
fi
# Install h2 database
echo Installing h2 database......
dir=$(dirname "$(readlink -f "$0")")
cp $dir/db/feedDatabase.h2.db ~
status=$?
if [ $status != 0 ]; then
h2 database Installation failed libre.h2.db
exit
fi
#cp $dir/db/feedDatabase.mv.db ~
#status=$?
#if [ $status != 0 ]; then
# h2 database Installation failed libre.mv.db
# exit
#fi
chmod +x $dir/*.sh
echo Successful. Installation done!!!!!
exit 0