diff --git a/make b/make index 566676d..0a2eb71 100755 --- a/make +++ b/make @@ -1,5 +1,5 @@ #!/bin/bash -rootDir='./site/' +rootDir='./tmp/' targetDir='post/' if [ -f .creds ] then @@ -9,6 +9,7 @@ fi # auto tools should be able to fix this post() { + echo Building: $1 tmp=".swap" full=".fullswap" base=`basename $1` @@ -24,11 +25,21 @@ post() { rm -f $tmp } -upload() { - cd $rootDir - name='' - # first the root pages - find -type f | xargs 'name=basename %';curl -f "$name=@%" $url +build_all() { + mkdir -p $rootDir/post/ $rootDir/fonts/ + + cp style.css "$rootDir" + cp style.css "$rootDir/$targetDir" + + cp fonts/* $rootDir/fonts/ + + # Try to get xargs to deal with this ugliness + for r in prebuild/*md;do + post $r + done + for p in prebuild/post/*md;do + post $p + done } _help() { @@ -39,23 +50,22 @@ _help() { -s copy stylesheets -l run live server' } - server() { cd $rootDir echo 'Address: 0.0.0.0:8080' python -m SimpleHTTPServer 8080 } -mkdir -p "$rootDir/post" - if [ -z $1 ] then _help exit 0 fi -while getopts ":slrhup:" opt;do +while getopts ":aslrhup:" opt;do case "$opt" in + a) + build_all;; s) cp style.css "$rootDir" # root stylesheet cp style.css "$rootDir/$targetDir" # post stylesheet