personal-website

source for my personal website regexghost.com
git clone https://git.regexghost.com/personal-website.git
Log | Files | Refs | README

build.sh (637B)


      1 #!/bin/sh
      2 
      3 [ -d /tmp/mainwebsite ] && rm -rf /tmp/mainwebsite
      4 
      5 mkdir /tmp/mainwebsite
      6 mkdir /tmp/mainwebsite/content
      7 
      8 cp -r gozer-files/templates /tmp/mainwebsite/
      9 cp -r gozer-files/config.toml /tmp/mainwebsite/
     10 cp -r index.md about.md /tmp/mainwebsite/content/
     11 cp -r linux other blog devlog coding /tmp/mainwebsite/content/
     12 cp -r static /tmp/mainwebsite/public
     13 
     14 cd /tmp/mainwebsite
     15 gozer build
     16 
     17 while read -r html_file; do
     18 	echo "$html_file"
     19 	tidy -q -indent "$html_file" > /tmp/tidy_out.html
     20 	mv -f /tmp/tidy_out.html "$html_file"
     21 done <<EOF
     22 $(find /tmp/mainwebsite/build -type f | grep 'html$')
     23 EOF
     24 
     25 [ "$1" = "serve" ] && gozer serve