aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh3
-rwxr-xr-xrelease.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 8bfe1fa..1303bb6 100755
--- a/build.sh
+++ b/build.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+script_dir=$(dirname "$0")
+cd "$script_dir"
+
CFLAGS="-O3 -s -flto -Wall -Wextra -DNDEBUG"
[ -z "$RELEASE" ] && CFLAGS="-O0 -g3 -Wall -Wextra";
CC=cc
diff --git a/release.sh b/release.sh
index 4e817fd..9f74df9 100755
--- a/release.sh
+++ b/release.sh
@@ -1,3 +1,6 @@
#!/bin/sh
+script_dir=$(dirname "$0")
+cd "$script_dir"
+
RELEASE=1 ./build.sh