Skip to content

Instantly share code, notes, and snippets.

@AhiyaHiya
Created June 5, 2019 18:16
Show Gist options
  • Save AhiyaHiya/05c50783da5e06ce8b185f928b5ccfc0 to your computer and use it in GitHub Desktop.
Save AhiyaHiya/05c50783da5e06ce8b185f928b5ccfc0 to your computer and use it in GitHub Desktop.
Downloads the catch2 unit testing header file
#!/usr/bin/env bash
# 2019-06-5
# Jaime O. Rios
# Brief: Downloads the Catch2 unit testing header file
# Script is expected to be called from base of project path, like ./scripts/setup_catch2.sh
set -o errexit
set -o nounset
# set -o xtrace
readonly CURRENT_DIR=$PWD
echo "Script starting"
if [ ! -d "${CURRENT_DIR}/lib/catch/include/" ]; then
echo "Downloading catch unit testing header file"
mkdir -p "${CURRENT_DIR}/lib/catch/include/catch2"
cd "${CURRENT_DIR}/lib/catch/include/catch2"
curl -O https://raw.githubusercontent.com/catchorg/Catch2/master/single_include/catch2/catch.hpp
fi
cd "$CURRENT_DIR"
echo "Script all done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment