summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-03-21 11:31:48 +0000
committerdavidovski <david@davidovski.xyz>2024-03-21 11:31:48 +0000
commit8fc27973f8fa4812271e63fcf76f5588f6e1d160 (patch)
tree60cd9791c8dd614b97e4399c1a19ccaa130e8b91
parentd3ab8fe00d7e101087aadbcf915e9306ed1dd58a (diff)
allow build to be executed from anywhere
-rwxr-xr-xbuild.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index d0b8a2e..de5def5 100755
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,10 @@
#!/bin/sh
-[ -d dist ] && rm -r dist
-mkdir dist
+script="$0"
+path="$(dirname $(realpath "$script"))"
+dist="$path/dist"
+site="$path/site"
-shblg -i site -o dist
+[ ! -d "$dist" ] && mkdir "$dist"
+
+shblg -i "$site" -o "$dist"