Skip to content

Commit 0821f47

Browse files
committed
Adds a script just for instlalign all the dependnecies
1 parent 255c33f commit 0821f47

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

run/install

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
3+
# SPDX-FileCopyrightText: 2024 Robin Vobruba <[email protected]>
4+
#
5+
# SPDX-License-Identifier: Unlicense
6+
7+
# See the output of "$0 -h" for details.
8+
9+
# Exit immediately on each error and unset variable;
10+
# see: https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
11+
set -Eeuo pipefail
12+
#set -Eeu
13+
14+
script_path="$(readlink -f "${BASH_SOURCE[0]}")"
15+
script_dir="$(dirname "$script_path")"
16+
# shellcheck source=./_common
17+
source "$script_dir/_common"
18+
script_name="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
19+
20+
# initial default values
21+
APP_NAME="RDF DB Dependencies Installer"
22+
23+
function print_help() {
24+
25+
echo "$APP_NAME - Installs all the dependencies."
26+
echo
27+
echo "Usage:"
28+
echo " $script_name [OPTION...] [DEPENDENCY...]"
29+
echo "Options:"
30+
echo " -h, --help"
31+
echo " Print this usage help and exit"
32+
echo "Examples:"
33+
echo " $script_name"
34+
echo " $script_name --help"
35+
}
36+
37+
# read command-line args
38+
POSITIONAL=()
39+
while [[ $# -gt 0 ]]
40+
do
41+
arg="$1"
42+
shift # $2 -> $1, $3 -> $2, ...
43+
44+
case "$arg" in
45+
-h|--help)
46+
print_help
47+
exit 0
48+
;;
49+
*) # non-/unknown option
50+
POSITIONAL+=("$arg") # save it in an array for later
51+
;;
52+
esac
53+
done
54+
set -- "${POSITIONAL[@]}" # restore positional parameters
55+
56+
ensure_java_version
57+
ensure_tool "$JENA_HOME" "$JENA_DL_URL" "Apache Jena"
58+
ensure_tool "$JENA_FUSEKI_HOME" "$JENA_FUSEKI_DL_URL" "Apache Jena Fuseki"

0 commit comments

Comments
 (0)