This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
molecule/overlay/bin/molecule

25 lines
660 B
Plaintext
Raw Normal View History

#!/bin/sh
set -eo pipefail
2019-11-22 22:31:53 +00:00
DIR=$(pwd)
LIBRARY_DIR=${DIR%/}/library/
FILTERS_DIR=${DIR%/}/plugins/filters/
if [ "${MOLECULE_CUSTOM_MODULES_REPO}" ]; then
echo "Cloning custom modules..."
[ -d "${iLIBRARY_DIR}" ] && rm -rf "${LIBRARY_DIR}"
mkdir -p "${LIBRARY_DIR}"
git clone "${MOLECULE_CUSTOM_MODULES_REPO}" "{LIBRARY_DIR}" 2> /dev/null
echo
fi
if [ "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
echo "Cloning custom filters..."
[ -d "${FILTERS_DIR}" ] && rm -rf "${FILTERS_DIR}"
mkdir -p "${FILTERS_DIR}"
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" "${FILTERS_DIR}" 2> /dev/null
echo
fi
exec /usr/local/bin/molecule "$@"