#!/bin/sh
|
|
|
|
# Kill the process on a failed command
|
|
set -e
|
|
|
|
if [ "`git status -s`" ]
|
|
then
|
|
echo "The working directory is dirty. Please commit any pending changes."
|
|
exit 1;
|
|
fi
|
|
|
|
echo Deleting old published version...
|
|
rm -rf public
|
|
|
|
echo Running Hugo...
|
|
hugo
|
|
|
|
echo Building search index...
|
|
node bin/make-index.js > public/search-index.json
|
|
gzip -f -n public/search-index.json
|
|
|
|
echo Building post list...
|
|
node bin/make-posts.js > public/posts.json
|
|
gzip -f -n public/posts.json
|
|
|
|
echo Uploading...
|
|
rsync -acvz --exclude=/.well-known --exclude=/.htaccess --delete public/ reclaimhosting.com:~/recipes
|
|
|
|
echo ''
|
|
echo Done!
|