diff options
Diffstat (limited to 'publish')
-rwxr-xr-x | publish | 30 |
1 files changed, 9 insertions, 21 deletions
@@ -3,13 +3,8 @@ HERE=$(dirname $(readlink -f ${0}))/src; HTML=html; -TEMP=$(mktemp -d); -rm -f ${HTML}.tgz; - -## -# Styles -# -(cd assets/css && ./compile.sh) +rm -fr ${HTML} ${HTML}.tgz; +mkdir ${HTML}; ## # Logo @@ -21,8 +16,8 @@ rm -f ${HTML}.tgz; # find ${HERE} -type f -name "*.psd" | while read k; do f="${k#*${HERE}}"; - mkdir -p "${TEMP}${f%/*}"; - convert "${k}[0]" -strip "${TEMP}${f%*.psd}.jpg"; + mkdir -p "${HTML}${f%/*}"; + convert "${k}[0]" -strip "${HTML}${f%*.psd}.jpg"; done ## @@ -30,8 +25,8 @@ done # find ${HERE} -type f -name "*.html" | while read k; do f="${k#*${HERE}}"; - mkdir -p "${TEMP}${f%/*}"; - sed > "${TEMP}${f}" "${k}" \ + mkdir -p "${HTML}${f%/*}"; + sed > "${HTML}${f}" "${k}" \ -e "/__HEADER__/r ${HERE}/header.fill" \ -e 's/__HEADER__//g' \ -e "/__FOOTER__/r ${HERE}/footer.fill" \ @@ -46,24 +41,17 @@ done ## # static assets # -cp -R ${HERE}/../assets ${TEMP}; +cp -R ${HERE}/../assets ${HTML}; ## # # -cp ${HERE}/robots.txt ${TEMP}; +cp ${HERE}/robots.txt ${HTML}; ## # payload # ( - cd ${TEMP}; + cd ${HTML}; tar -pczf ../${HTML}.tgz .; ) - -## -# Cutover. -# -rm -fr ${HTML}; -mv ${TEMP} ${HTML}; -chmod 755 ${HTML}; |