diff --git a/configure b/configure new file mode 100755 index 0000000..10e2d1a --- /dev/null +++ b/configure @@ -0,0 +1,38 @@ +#! /bin/env bash + +CONTENT="${CONTENT:-content}" +SITE_ENV="${SITE_ENV:-${CONTENT}/site-env}" + +curate="${curate:-about}" +index="${index:-index}" + +# Confirm overwrite of configuration +if [[ -r ${SITE_ENV} ]] +then + read -N 1 -p "Overwrite configuration in ${SITE_ENV} Y/N [Y]? " overwrite + if [[ "${overwrite}" = "y" ]] # TODO accept upper of lower y + then + rm -f ${SITE_ENV} + fi +fi + +echo "List directories of curated content that will NOT be automatically indexed: " +echo "(default: ${curate})" +read -p "> " curate +echo "CURATE_DIRS=${curate}" >> ${SITE_ENV} + +echo "List directories of curated content that WILL be automatically indexed: " +echo "(default: ${index})" +read -p "> " index +echo "INDEX_DIRS=${index}" >> ${SITE_ENV} + +echo "Enter URL for content:" +read -p "> " content_url +echo "GEMINI_SITE=${content_url}" >> ${SITE_ENV} + +echo "Enter URL of the Gemini site:" +read -p "> " gemini_url +echo "GEMINI_URL=${gemini_url}" >> ${SITE_ENV} + +echo "\nCreated ${SITE_ENV}:\n" +cat "${SITE_ENV}"