diff options
| author | Christian Cleberg <[email protected]> | 2024-10-31 09:57:41 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2024-10-31 09:57:41 -0500 |
| commit | 86b90a2768ba25c62333c2c83d96a675244d4a4f (patch) | |
| tree | 01599d75147a47eaed55911a40984e56012b2a2c | |
| parent | 9007704c4b298a00b971e2ab80fdc404d8570edc (diff) | |
| download | cleberg.net-86b90a2768ba25c62333c2c83d96a675244d4a4f.tar.gz cleberg.net-86b90a2768ba25c62333c2c83d96a675244d4a4f.tar.bz2 cleberg.net-86b90a2768ba25c62333c2c83d96a675244d4a4f.zip | |
enhance build script
| -rwxr-xr-x | build.sh | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -3,22 +3,19 @@ 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 &>/dev/null && \ - minify -o theme/static/styles.min.css \ - theme/static/styles.css && \ - rsync -r --delete-before .build/* \ - ubuntu:/var/www/cleberg.net/ +if [[ "$answer" =~ ^[Yy]$ ]]; then + if [[ "$ENV" == "prod" ]]; then + echo "Environment: Production" + rm -rf .build/* + emacs --script publish.el &>/dev/null + minify -o theme/static/styles.min.css theme/static/styles.css + rsync -r --delete-before .build/* ubuntu:/var/www/cleberg.net/ else - echo "Environment: Development" && \ - rm -rf .build/* && \ - emacs --script publish.el && \ - minify -o theme/static/styles.min.css \ - theme/static/styles.css && \ - cd .build/ && \ + echo "Environment: Development" + rm -rf .build/* + emacs --script publish.el + minify -o theme/static/styles.min.css theme/static/styles.css + cd .build/ python3 -m http.server fi else |
