-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·84 lines (63 loc) · 3.44 KB
/
install.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env bash
# this script installs the linking workflow.
if [ `whoami` == jonas ]; then
BASE_DATA_PATH='/home/jonas/linked/data'
elif [ `whoami` == swissbib ]; then
BASE_DATA_PATH='/swissbib_index/data'
else
echo "Unknown user! Specifiy base data path for this user!"
fi
LINKED_SOURCE_DATA_FOLDER="$BASE_DATA_PATH/enrichedLineInput"
LINKED_TARGET_DATA_FOLDER="$BASE_DATA_PATH/enrichedLineOutput"
LINKED_TMP_DATA_FOLDER="$LINKED_TARGET_DATA_FOLDER/tmp"
LINKED_DBPEDIA_DATA_FOLDER="$LINKED_TARGET_DATA_FOLDER/dbpedia"
LINKED_VIAF_DATA_FOLDER="$LINKED_TARGET_DATA_FOLDER/viaf"
LINKED_LOGGING="$LINKED_TARGET_DATA_FOLDER/logs"
LINKED_WIKI_DATA_FOLDER="$LINKED_TARGET_DATA_FOLDER/wikidata"
if [ ! -d "$LINKED_SOURCE_DATA_FOLDER" ]; then
echo "Could not find source folder at $LINKED_SOURCE_DATA_FOLDER! Please specify a source folder."
exit 1
fi
if [ ! -d "$LINKED_TARGET_DATA_FOLDER" ]; then
mkdir "$LINKED_TARGET_DATA_FOLDER"
fi
if [ ! -d "$LINKED_TMP_DATA_FOLDER" ]; then
mkdir "$LINKED_TMP_DATA_FOLDER"
fi
if [ ! -d "$LINKED_DBPEDIA_DATA_FOLDER" ]; then
mkdir "$LINKED_DBPEDIA_DATA_FOLDER"
fi
if [ ! -d "$LINKED_VIAF_DATA_FOLDER" ]; then
mkdir "$LINKED_VIAF_DATA_FOLDER"
fi
if [ ! -d "$LINKED_WIKI_DATA_FOLDER" ]; then
mkdir "$LINKED_WIKI_DATA_FOLDER"
fi
if [ ! -d "$LINKED_LOGGING" ]; then
mkdir "$LINKED_LOGGING"
fi
RESHAPERDF_SCRIPT="$(pwd)/reshaperdf"
cd ..
LINKING_WORKING_DIRECTORY="$(pwd)/linking"
git clone https://github.com/linked-swissbib/linking_enrichment_environment.git "$LINKING_WORKING_DIRECTORY"
cd "$LINKING_WORKING_DIRECTORY"
export LINKING_APPS_FOLDER="$LINKING_WORKING_DIRECTORY/apps"
wget -nc -P "$LINKING_APPS_FOLDER/LIMES" "https://github.com/dice-group/LIMES/releases/download/1.5.0/limes-core-1.5.0.jar"
wget -nc -P "$LINKING_APPS_FOLDER/reshaperdf" "https://github.com/linked-swissbib/reshaperdf/releases/download/v1.0.0/reshaperdf-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/transform" "https://github.com/linked-swissbib/transformationtools/releases/download/v1.0.0/ntextract-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/transform" "https://github.com/linked-swissbib/transformationtools/releases/download/v1.0.0/ntriples2jsonld-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/transform" "https://github.com/linked-swissbib/transformationtools/releases/download/v1.0.0/rdfstats-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/transform" "https://github.com/linked-swissbib/transformationtools/releases/download/v1.0.0/sparqlrequest-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/transform" "https://github.com/linked-swissbib/transformationtools/releases/download/v1.0.0/splitfile-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/transform" "https://github.com/linked-swissbib/transformationtools/releases/download/v1.0.0/unloadtriplestore-1.0-SNAPSHOT-all.jar"
wget -nc -P "$LINKING_APPS_FOLDER/genconfig" "https://github.com/linked-swissbib/genconfig/releases/download/v1.0.0/genconfig-1.0-SNAPSHOT-all.jar"
echo '#!/usr/bin/env bash' > "$RESHAPERDF_SCRIPT"
echo '# script to run reShapeRDF directly from bash.' >> "$RESHAPERDF_SCRIPT"
echo '' >> "$RESHAPERDF_SCRIPT"
echo "java -Xmx8g -jar $LINKING_APPS_FOLDER/reshaperdf/reshaperdf-1.0-SNAPSHOT-all.jar \$@" >> "$RESHAPERDF_SCRIPT"
# script to be able to run reshaperdf as globally.
sudo cp "$RESHAPERDF_SCRIPT" /usr/bin/
sudo chown root:root /usr/bin/reshaperdf
sudo chmod +x /usr/bin/reshaperdf
echo Done
exit 0