diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..81c09c6 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +printf "Did you update the 'Recent Blog Posts' section? [yn]" +read answer + +if [ "$answer" != "${answer#[Yy]}" ] ; then + if [ "$ENV" == "prod" ]; then + echo "Environment = Production" && \ + rm -rf .build/* && \ + emacs --script publish.el && \ + rsync -av --delete-before public/* ubuntu:/var/www/cleberg.net/ + else + echo "Environment = Development" && \ + rm -rf .build/* && \ + emacs --script publish.el && \ + cd .build/ && \ + python3 -m http.server + fi +else + echo No +fi |