Skip to content

Commit 9660ea9

Browse files
committed
fix bench download script
1 parent 35f90de commit 9660ea9

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

scripts/download-sample-bench.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3-
set +ex
3+
set -euo pipefail
44

55
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
6+
DEST_DIR="${SCRIPT_DIR}/../tests/resources"
7+
DEST_NQ="${DEST_DIR}/taxonomy-nodes.nq"
68

7-
if [[ -z "${CI}" ]] && [[ -f "${SCRIPT_DIR}/../tests/resources/taxonomy-nodes.nq" ]]; then
9+
if [[ -z "${CI:-}" ]] && [[ -f "${DEST_NQ}" ]]; then
810
echo "dependencies present"
911
exit 0
1012
fi
1113

12-
sudo curl -L https://download.bio2rdf.org/files/release/4/taxonomy/taxonomy-nodes.nq.gz -o $SCRIPT_DIR/../tests/resources/taxonomy-nodes.nq.gz
13-
sudo apt-get install gzip -y
14-
gzip -d $SCRIPT_DIR/../tests/resources/taxonomy-nodes.nq.gz
14+
mkdir -p "${DEST_DIR}"
15+
curl --fail --location --show-error \
16+
"https://download.bio2rdf.org/files/release/4/taxonomy/taxonomy-nodes.nq.gz" \
17+
-o "${DEST_NQ}.gz"
18+
gunzip -f "${DEST_NQ}.gz"

0 commit comments

Comments
 (0)