#!/usr/bin/env bash # Author: Martin Winkler # License: Please refer to the repository # Origin: https://winklerfamilie.eu/git/SmallThings/icsutils.git # Exit on error. Append "|| true" if you expect an error. set -o errexit # Exit on error inside any functions or subshells. set -o errtrace # Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR set -o nounset # Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` set -o pipefail # gc = google calendar gc::getIcsUsage() { cat </dev/null) && _sourced=1 else # All other shells: examine $0 for known shell binary filenames # Detects `sh` and `dash`; add additional shell filenames as needed. case ${0##*/} in sh|dash) _sourced=1;; esac fi ### if (( ! _sourced )); then gc::getIcs "${@}" fi