The Dingenskirchen Systems Internet Presence
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 762B

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 -L src/md -type f)
  12. for FILE in $FILES
  13. do
  14. pandoc --template=src/template.html --variable path=$(echo $FILE | sed -r "s/src\/md\/(.+)\.md/\1/") $FILE -o public/$(echo $FILE | sed -r "s/src\/md\/(.+)\.md/\1/")/index.html
  15. done
  16. sed -e "s/https:\/\/dingenskirchen.systems\/index/https:\/\/dingenskirchen.systems\//" -e "s/↑ <a href=\"\/\">Main Page<\/a>//" public/index/index.html > public/index.html
  17. rm public/index/ -rf