2020-07-13 12:42:14 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# Scripte zur Transformation von Bibliotheca und Alephino nach PICA+
|
|
|
|
|
2020-08-01 11:48:36 +02:00
|
|
|
# check and install requirements for bash-refine
|
|
|
|
source "${BASH_SOURCE%/*}/bash-refine.sh" || exit 1
|
|
|
|
requirements
|
|
|
|
|
|
|
|
# download task runner
|
2020-08-01 02:04:39 +02:00
|
|
|
task="$(readlink -m "${BASH_SOURCE%/*}/lib/task")"
|
|
|
|
if [[ -z "$(readlink -e "${task}")" ]]; then
|
|
|
|
echo "Download task..."
|
|
|
|
mkdir -p "$(dirname "${task}")"
|
|
|
|
curl -L --output task.tar.gz \
|
|
|
|
"https://github.com/go-task/task/releases/download/v3.0.0-preview4/task_linux_amd64.tar.gz"
|
|
|
|
tar -xzf task.tar.gz -C "$(dirname "${task}")" task --totals
|
|
|
|
rm -f task.tar.gz
|
|
|
|
fi
|
|
|
|
|
2020-08-01 11:48:36 +02:00
|
|
|
# make script executable from another directory
|
|
|
|
cd "${BASH_SOURCE%/*}/" || exit 1
|
|
|
|
|
|
|
|
# create folders
|
|
|
|
"${task}" mkdir
|
|
|
|
|
2020-08-01 02:04:39 +02:00
|
|
|
# execute default task (cf. Taskfile.yml)
|
|
|
|
"${task}"
|