aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2024-10-31 09:57:41 -0500
committerChristian Cleberg <hello@cleberg.net>2024-10-31 09:57:41 -0500
commit885d333a306bec57d798ec73cf93225bc2dc0fb5 (patch)
tree01599d75147a47eaed55911a40984e56012b2a2c /build.sh
parent6c6a02dbd208ea180c1aa2d5cf7c51d5d36fa8ba (diff)
downloadcleberg.net-885d333a306bec57d798ec73cf93225bc2dc0fb5.tar.gz
cleberg.net-885d333a306bec57d798ec73cf93225bc2dc0fb5.tar.bz2
cleberg.net-885d333a306bec57d798ec73cf93225bc2dc0fb5.zip
enhance build script
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh27
1 files changed, 12 insertions, 15 deletions
diff --git a/build.sh b/build.sh
index de89324..1f71451 100755
--- a/build.sh
+++ b/build.sh
@@ -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