Commit 0851389d authored by Zach van Rijn's avatar Zach van Rijn
Browse files

Atomic website updates.

parent 597ae62c
......@@ -3,8 +3,8 @@
HERE=$(dirname $(readlink -f ${0}))/src;
HTML=html;
rm -fr ${HTML} ${HTML}.tgz;
mkdir ${HTML};
rm -f ${HTML}.tgz;
TEMP=$(mktemp -d);
##
# Logo
......@@ -16,8 +16,8 @@ mkdir ${HTML};
#
find ${HERE} -type f -name "*.psd" | while read k; do
f="${k#*${HERE}}";
mkdir -p "${HTML}${f%/*}";
convert "${k}[0]" -strip "${HTML}${f%*.psd}.jpg";
mkdir -p "${TEMP}${f%/*}";
convert "${k}[0]" -strip "${TEMP}${f%*.psd}.jpg";
done
##
......@@ -25,8 +25,8 @@ done
#
find ${HERE} -type f -name "*.html" | while read k; do
f="${k#*${HERE}}";
mkdir -p "${HTML}${f%/*}";
sed > "${HTML}${f}" "${k}" \
mkdir -p "${TEMP}${f%/*}";
sed > "${TEMP}${f}" "${k}" \
-e "/__HEADER__/r ${HERE}/header.fill" \
-e 's/__HEADER__//g' \
-e "/__FOOTER__/r ${HERE}/footer.fill" \
......@@ -41,17 +41,23 @@ done
##
# static assets
#
cp -R ${HERE}/../assets ${HTML};
cp -R ${HERE}/../assets ${TEMP};
##
#
#
cp ${HERE}/robots.txt ${HTML};
cp ${HERE}/robots.txt ${TEMP};
##
# payload
#
(
cd ${HTML};
cd ${TEMP};
tar -pczf ../${HTML}.tgz .;
)
##
# publish
#
rm -fr ${HTML};
mv ${TEMP} ${HTML};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment