help command done

This commit is contained in:
AlejandroS 2018-06-22 19:44:06 -07:00
parent 25ad61a1dc
commit 40afc66f61
2 changed files with 26 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.swp
test*

29
make.sh
View File

@ -1,10 +1,19 @@
# not only updates the post but inserts the description found in desc.md into the index.md then recompiles
# only gets called if
post() {
# check directory existence
if [ -f markdown/post/$1 ]
then
# compile the new post and drop it in ./post/
pandoc markdown/post/$1 --css bstyle.css -s -o post/${1%.*}.html
# check to see if we have to rebuild the post or not
if [ $2 == "n" ]
then
echo "changing index.html for brand new post"
fi
else
echo "Check parameters as well: ./make.sh fileType inputFile"
# error message incase file was not found
echo "File \"$1\" not found in markdown/post"
fi
}
@ -19,9 +28,21 @@ page() {
}
help() {
echo "Usage: \./make.sh fileType targetSource"
echo "fileType - \[post, page\] - specifices type of html doc to create"
echo "targetSource - the file itself that you created in the /markdown directory"
case $1 in
type)
echo -e "[post, page] \n\tThe kind of page you want to add to the site"
echo "Different types result in different compilation locations"
;;
target)
echo "The file that you want to actually compile to html"
;;
flag)
echo -e "Available flags:\n\tr - rebuilds file, does not update index.html\n\tn - builds file, updates index.html"
echo -e "\t*Pages will not update index.html*"
;;
*)
echo "./make.sh type target.md flag"
esac
}
"$@"