Skip to content

Commit

Permalink
tries fixing script
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Jan 29, 2024
1 parent 1d146fa commit 511d038
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/installAndTest
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash
# WF 2021-06-12
# install and test
# kill running jena
scripts/jena -k
# remove the data directory if it exists
scripts/jena -c
# install apache jena and load example data
scripts/jena -l sampledata/example.ttl
# command to run tests
# kill running jena
scripts/jena -k
# run apache jena fuseki server
scripts/jena -f example
# command to install dependencies
Expand Down
20 changes: 19 additions & 1 deletion scripts/jena
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,21 @@ backup() {
$tdbbackup --loc $dataPath
}

#
# clear the data directory
#
clearData() {
# remove the data directory if it exists
if [ -d data ]
then
color_msg $blue "removing data directory"
rm -rf data
else
color_msg $green "data directory does not exist yet"
color_msg $blue "creating data directory"
mkdir data
fi
}
# set operating system specific environment variables
os=$(uname)
case $os in
Expand All @@ -165,7 +180,7 @@ case $os in
sudo="sudo"
;;
Darwin)
pkill="pkill -fla"
pkill="pkill -fl"
sudo=""
;;
*)
Expand All @@ -180,6 +195,9 @@ do
-b|--backup)
backup
;;
-c|--clear)
clearData
;;
-f|--fuseki)
shift
if [ $# -lt 1 ]
Expand Down

0 comments on commit 511d038

Please sign in to comment.