diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-07-28 19:45:52 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-07-28 19:45:52 -0500 |
commit | afe76ac7d7498b862abaa623790b91410e34574d (patch) | |
tree | 4fa6d59b4954e9756061875621e115b1b30561c7 /build.sh | |
parent | c6a33b78b9a75f5105a6847da9677c014327242e (diff) | |
download | cleberg.net-afe76ac7d7498b862abaa623790b91410e34574d.tar.gz cleberg.net-afe76ac7d7498b862abaa623790b91410e34574d.tar.bz2 cleberg.net-afe76ac7d7498b862abaa623790b91410e34574d.zip |
add safety check to build.sh
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 |