Made the script take in a paramter, which is the directory containing 'source' and 'output'

master
Aadhavan Srinivasan 8 months ago
parent d098c7c290
commit 54dda40de4

@ -13,7 +13,7 @@
#
# To use it, create a directory for your project (e.g. 'website'). Inside 'website', create
# two directories: 'source' (which holds your Markdown files) and 'output' (which holds the
# converted CSS.
# converted HTML.
#
# In addition to these directories, three files are needed in 'website':
# 1. 'header.html' - A header, which is prepended to every source file. Unfortunately, this must
@ -21,6 +21,8 @@
# 2. 'footer.html' - A footer, which is appended to every source file. Also must be written in HTML.
# 3. 'styles.css' - A global stylesheet.
#
# The script takes in a parameter, which is the directory that contains the 'source' and 'output' folders.
#
# If you have any comments or questions, please email aadhavan@twomorecents.org.
@ -31,8 +33,11 @@ set -o pipefail # Treat a pipeline as failing, even if one command in the pipeli
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi # Enable tracing (output of each command) if the TRACE variable is set
BASE_PATH="$(dirname "$0")"
if [ "$#" -ne 1 ]; then
echo "ERROR: Invalid number of paramters. Read script for more details."
exit
fi
BASE_PATH=$(cd "$1"; pwd)
check_for_dirs() {
if [[ ! -d "${BASE_PATH}/source" ]]; then

Loading…
Cancel
Save