aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSan Jacobs2026-01-23 22:36:16 +0100
committerSan Jacobs2026-01-23 22:36:16 +0100
commit4df4c057ef3fed435d547adfe4fd1187bb087f32 (patch)
treefbc811b3bb1894f916d07220fb2a1ef4d01419db
parentb7d10d0a31470eb745af4e5d8e56cfa73a45c2b1 (diff)
downloadstatics-4df4c057ef3fed435d547adfe4fd1187bb087f32.tar.gz
statics-4df4c057ef3fed435d547adfe4fd1187bb087f32.tar.bz2
statics-4df4c057ef3fed435d547adfe4fd1187bb087f32.zip
Linux fixery
-rwxr-xr-xbuild.sh2
-rw-r--r--main.odin6
2 files changed, 2 insertions, 6 deletions
diff --git a/build.sh b/build.sh
index d50604a..bd0f5e4 100755
--- a/build.sh
+++ b/build.sh
@@ -1 +1 @@
-odin run .
+odin build . -debug -out:statics && ./statics test-data.ics -v -s Test && odin build . -o:speed -out:release/statics
diff --git a/main.odin b/main.odin
index 71706fe..d6a952c 100644
--- a/main.odin
+++ b/main.odin
@@ -69,7 +69,7 @@ main :: proc() {
files_to_process : [dynamic]string
flag_start := 0
- for &arg, i in os.args {
+ for &arg, i in os.args[1:] {
if len(arg) == 2 {
if arg[0] == '-' {
flag_start = i
@@ -79,10 +79,6 @@ main :: proc() {
lower := strings.to_lower(arg, context.allocator)
- // I feel like there's a platform that doesn't supply the executable
- // as the first argument, so I'm doing this at runtime just in case
- if lower[max(0, len(lower)-4):len(lower)] == ".exe" do continue
-
file_exists := os.is_file(arg)
if file_exists {
if lower[max(0, len(lower)-4):len(lower)] == ".ics" {