#!/bin/bash # -*- sh-basic-offset: 2; -*- # # Please format this file with shfmt from https://github.com/mvdan/sh/releases # by running the following command: # # shfmt -i 2 -w quickstart-tlbc.sh set -e # Variables : "${DOCKER_IMAGE:=trustlines/quickstart@sha256:2fd70374bec228ca80e99bccbea58a3ecca5f4b5fc1184c25f1d79d62ca25b90}" : "${DATA_DIR:=${PWD}/tlbc}" GREEN='\033[0;32m' RESET='\033[0m' # Print colored messages to the user. # function printmsg() { echo -en "${GREEN}" cat echo -en "${RESET}" } # Function for some checks at the beginning to make sure everything will run well. # This includes the check for commands, permissions and the environment. # The checks can close the process with an error message or set additional options. # function sanityChecks() { if ! command -v docker >/dev/null; then printmsg <