My Website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.sh 565B

123456789101112131415161718
  1. #!/bin/bash
  2. #remove old artifacts
  3. rm -rf public/
  4. #create all target directories
  5. mkdir -p $(find src/md/ | sed "s/src\/md/public/" | sed "s/\.md//") && mkdir public/res || echo "[build.sh] Failure."
  6. #compile css
  7. sassc src/sass/main.sass public/res/main.css
  8. #move resources
  9. cp src/res/* public/res
  10. #run all md files through pandoc
  11. FILES=$(find src/md -type f)
  12. for FILE in $FILES
  13. do
  14. pandoc --template=src/template.html $FILE -o public/$(echo $FILE | sed -r "s/src\/md\/(.+)\.md/\1/")/index.html
  15. done
  16. mv public/index/index.html public/index.html
  17. rm public/index/ -rf