removed unused or pointless fluff

This commit is contained in:
Medium Fries 2019-04-25 14:53:21 -07:00
parent acd77ae0f8
commit f2a688c60a

31
make.sh
View File

@ -2,14 +2,6 @@
# compiles new post into target directory
rootDir='./tmp/'
mdRoot='./prebild/'
mPostDir='./prebuild/post/'
# Right now:
# no images
# root pages
# post pages
post() {
# First get the body of the document
tmp=".swap"
@ -20,27 +12,10 @@ post() {
sed -i "3i <title>${base%.*}</title>" $tmp
# finally move this post to its proper location in the _rootDir
mv $tmp "$rootDir/post/${base%.*}.html"
rm -f $tmp
}
# Options:
# -f post-file
# -s stylesheet
#[[ -z $# ]] && echo "./make.sh -h" && echo 'for more info' && exit 0
target=""
stylesheet=""
while getopts "f:h" opt; do
case $opt in
h)
echo '-h shows this prompt'
;;
f)
target=$2
echo "Target post $2"
;;
esac
for file in $@;do
post $target
done
# attempt to build the new post
[[ -z $target ]] && echo 'No target' && exit 0
post $target