Commit e86c55dbfa

e86c55dbfad35870e76bd0e69991416f60017512

parent: 92310e30a0

Unsigned

cmc <hello@cleberg.net> · 2024-07-29 00:45 UTC

add safety check to build.sh

Layout: unified · split

build.sh added +21
@@ -0,0 +1,21 @@
1#!/bin/bash
2
3printf "Did you update the 'Recent Blog Posts' section? [yn]"
4read answer
5
6if [ "$answer" != "${answer#[Yy]}" ] ; then
7 if [ "$ENV" == "prod" ]; then
8 echo "Environment = Production" && \
9 rm -rf .build/* && \
10 emacs --script publish.el && \
11 rsync -av --delete-before public/* ubuntu:/var/www/cleberg.net/
12 else
13 echo "Environment = Development" && \
14 rm -rf .build/* && \
15 emacs --script publish.el && \
16 cd .build/ && \
17 python3 -m http.server
18 fi
19else
20 echo No
21fi