removed unused or pointless fluff
This commit is contained in:
parent
acd77ae0f8
commit
f2a688c60a
31
make.sh
31
make.sh
@ -2,14 +2,6 @@
|
|||||||
# compiles new post into target directory
|
# compiles new post into target directory
|
||||||
rootDir='./tmp/'
|
rootDir='./tmp/'
|
||||||
|
|
||||||
mdRoot='./prebild/'
|
|
||||||
mPostDir='./prebuild/post/'
|
|
||||||
|
|
||||||
# Right now:
|
|
||||||
# no images
|
|
||||||
# root pages
|
|
||||||
# post pages
|
|
||||||
|
|
||||||
post() {
|
post() {
|
||||||
# First get the body of the document
|
# First get the body of the document
|
||||||
tmp=".swap"
|
tmp=".swap"
|
||||||
@ -20,27 +12,10 @@ post() {
|
|||||||
sed -i "3i <title>${base%.*}</title>" $tmp
|
sed -i "3i <title>${base%.*}</title>" $tmp
|
||||||
# finally move this post to its proper location in the _rootDir
|
# finally move this post to its proper location in the _rootDir
|
||||||
mv $tmp "$rootDir/post/${base%.*}.html"
|
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=""
|
target=""
|
||||||
stylesheet=""
|
for file in $@;do
|
||||||
while getopts "f:h" opt; do
|
|
||||||
case $opt in
|
|
||||||
h)
|
|
||||||
echo '-h shows this prompt'
|
|
||||||
;;
|
|
||||||
f)
|
|
||||||
target=$2
|
|
||||||
echo "Target post $2"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# attempt to build the new post
|
|
||||||
[[ -z $target ]] && echo 'No target' && exit 0
|
|
||||||
post $target
|
post $target
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user