-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·50 lines (42 loc) · 1.32 KB
/
install.sh
File metadata and controls
executable file
·50 lines (42 loc) · 1.32 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
#!/bin/bash
if [ -z $JAVA_HOME ];then
read -p "\$JAVA_HOME isn't set. Do you want to set it automatically to your .profile file ? (y|n) " answer
case $answer in
[Yy]* )
if [ -x $(command -v javac) ]; then
echo "export JAVA_HOME=\"$(dirname $(dirname $(readlink -f $(which javac))))\"" >> $HOME/.profile
source $HOME/.profile
else
echo "Please install Java 8 JDK (sudo apt-get install openjdk-8-jdk)."
fi
;;
* )
echo "Please set the \$JAVA_HOME variable."
exit 1
;;
esac
fi
#if [ -z $CORPUS_DATA ]; then
#echo "You might define \$CORPUS_DATA to your folder containing TAC/DUC corpus."
#fi
if [ ! -x $(command -v jep) ]; then
echo -n "MOTS need the installation of python package jep. Use 'pip3 install jep --user'"
exit 1
fi
if [ -z $JEP_HOME ]; then
echo "export JEP_HOME=\"$(python3 -m site --user-site)/jep\"" >> $HOME/.profile
source $HOME/.profile
fi
if [ ! -x $(command -v mvn) ]; then
echo "Please install Maven (sudo apt-get install maven)."
else
#source $(pwd)/jep_env_before
mvn install
#source $(pwd)/jep_env_after
fi
#if [ -n $CORPUS_DATA ]; then
#echo Update TAC/DUC multicorpus configuration file to your \$CORPUS_DATA folder.
#sed -i "s/\$CORPUS_DATA/$CORPUS_DATA/g" conf/*.xml
#fi
echo "Installation of MOTS succeed in the target directory !"
exit 0