Add site configuration site generator
This commit is contained in:
parent
2f0e9afba4
commit
efc989f237
38
configure
vendored
Executable file
38
configure
vendored
Executable file
@ -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}"
|
Loading…
x
Reference in New Issue
Block a user