# Script for running tests with different OpenRefine and Java versions based on Docker images.
# Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
# check system requirements
DOCKER="$(which docker 2> /dev/null)"
if[ -z "$DOCKER"];then
echo 1>&2"This action requires you to have 'docker' installed and present in your PATH. You can download it for free at http://www.docker.com/"
exit1
fi
DOCKERINFO="$(docker info 2>/dev/null | grep 'Server Version')"
if[ -z "$DOCKERINFO"];then
echo 1>&2"This action requires you to start the docker daemon. Try 'sudo systemctl start docker' or 'sudo start docker'. If the docker daemon is already running then maybe some security privileges are missing to run docker commands. Try to run the script with 'sudo ./openrefine-batch-docker.sh ...'"
exit1
fi
CURLINFO="$(which curl 2>/dev/null)"
if[ -z "$CURLINFO"];then
echo 1>&2"This action requires you to have 'curl' installed and present in your PATH."