Commit 140dd15f authored by John Tourtellott's avatar John Tourtellott

Rename .jade files to .pug, and move to separate subfolder

parent afc500e5
#!/usr/bin/env bash
# List of templates in subfolder
# List of pug templates to render
declare -a names=( \
"body-source-probe" \
"boundary-condition" \
......@@ -10,11 +10,29 @@ declare -a names=( \
"enclosure" \
"other" \
)
# Get script directory, per http://stackoverflow.com/questions/59895
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
TARGET="$(readlink "$SOURCE")"
if [[ $TARGET == /* ]]; then
SOURCE="$TARGET"
else
DIR="$( dirname "$SOURCE" )"
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
fi
done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
echo "script DIR is '$DIR'"
subfolder="templates"
for name in ${names[@]}; do
#echo ${name}
rm -f ${subfolder}/${name}.sbt
jade ${subfolder}/${name}.jade --pretty --extension sbt
python fixmultilinetext.py ${subfolder}/${name}.sbt
pug ${subfolder}/pug/${name}.pug --pretty --extension sbt -o ${subfolder}
# python fixmultilinetext.py ${subfolder}/${name}.sbt
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment