~cadence/bliz-devel

bliz: Minor bugfixes v1 APPLIED

Hi, I had an issue with the working directory of `main.fish`, so I used
the same code as `certs.fish` to make it possible to run it from a
different working directory. I also fixed a bug on macOS, so it now
works there as well!

Sorry, this is my first time using sourcehut, and I've never sent a
patch like this before, so hopefully everything works..

flry (2):
  Support running `main.fish` from a different dir
  Fix error on macOS

 main.fish    | 2 ++
 src/cgi.fish | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
2.34.1
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~cadence/bliz-devel/patches/30049/mbox | git am -3
Learn more about email & git

[PATCH bliz 1/2] Support running `main.fish` from a different dir Export this patch

From: flry <flry@git.sr.ht>

---
 main.fish | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main.fish b/main.fish
index d5a619a..e419219 100755
--- a/main.fish
+++ b/main.fish
@@ -1,5 +1,7 @@
#!/usr/bin/env fish

cd (dirname (status current-filename)); or exit

source src/config.fish
source src/includes.fish

-- 
2.34.1

[PATCH bliz 2/2] Fix error on macOS Export this patch

From: flry <flry@git.sr.ht>

On Linux, `file` uses the `-i` option for mime types, but on macOS
that option is called `-I`. The long `--mime` option is cross-platform.
---
 src/cgi.fish | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cgi.fish b/src/cgi.fish
index 5c32d04..1f66a18 100644
--- a/src/cgi.fish
+++ b/src/cgi.fish
@@ -121,7 +121,7 @@ if test -f "$file_path"
    if string match -q -r -- '^.*\.(gmi)$' $file_path
        set mime text/gemini
    else
        set mime (file -ib $file_path)
        set mime (file -b --mime $file_path)
    end
    gem_header 20 $mime
    cat $file_path
-- 
2.34.1