site

source files for beau's website
git clone https://git.beauhilton.com/site.git
Log | Files | Refs

post-receive (541B)


      1 #!/bin/sh -e
      2 
      3 title='Beau Hilton'
      4 url='https://beauhilton.com'
      5 
      6 dst="/var/www/htdocs/www.beauhilton.com"
      7 raw="$dst/raw"
      8 src="$dst/src"
      9 
     10 if test -z "${PWD##*.git}"
     11         then repo="$PWD"
     12         else repo="$PWD/.git"
     13 fi
     14 
     15 rm -rf "${dst:?}/.files"
     16 rm -rf "$raw"
     17 rm -rf "$src:?"
     18 
     19 mkdir -p "$raw"
     20 echo "${title}" > "$repo/owner"
     21 git clone "$repo" "$raw"
     22 (cd "$raw/.git" && git update-server-info)
     23 
     24 "$HOME/bin/ssg6" "$raw" "$dst" "$title" "$url" > /dev/null
     25 
     26 mkdir -p "$src"
     27 (cd "$src" && stagit "$repo")
     28 cp -f "$src/log.html" "$src/index.html"