home readme diff tree note docs

0commit 1d3d0cbb73e07a3e4736944b6067e7141067016a
1Author: lakefox <mason@lakefox.net>
2Date:   Sat May 23 11:44:50 2026 -0600
3
4    Hello
5
6diff --git a/cgi-bin/cgi.awk b/cgi-bin/cgi.awk
7index d16c0df..ae363cc 100755
8--- a/cgi-bin/cgi.awk
9+++ b/cgi-bin/cgi.awk
10@@ -14,27 +14,36 @@ BEGIN {
11                 } else if (kv[1] == "path") {
12                         path = sanitize(kv[2])
13                 } else {
14-			 params[kv[1]] = sanitize(kv[2])
15-		}
16+                         params[kv[1]] = sanitize(kv[2])
17+                }
18         }
19 
20         if (name == "") { print "Status: 400 Bad Request\r\n\r\nMissing repository."; exit }
21-	if (hash == "") hash = "HEAD"
22+        if (hash == "") hash = "HEAD"
23 
24-	query_args = ""
25-	for (p in params) query_args = query_args p "=" params[p] " "
26+        query_args = ""
27+        for (p in params) query_args = query_args p "=" params[p] " "
28 
29-	file = "/tmp/" hash "/" path
30+        file = "/tmp/" hash "/" path
31 
32-	if (system("test -x " file) != 0) {
33-		system("mkdir -p /tmp/" hash " && git --git-dir=/var/git/" name ".git/ show " hash ":" path " > " file " && chmod +x " file)
34-	}
35+        if (system("test -x " file) != 0) {
36+                n = split(path, parts, "/")
37 
38-	cmd = query_args " " file
39-	while ((cmd | getline line) > 0) {
40-		print line
41-	}
42-	close(cmd)
43+                dir_path = "/tmp/" hash
44+                for (i = 1; i < n; i++) {
45+                        dir_path = dir_path "/" parts[i]
46+                }
47+
48+                system("mkdir -p " dir_path)
49+                system("git --git-dir=/var/git/" name ".git/ show " hash ":" path " > " file)
50+                system("chmod +x " file)
51+        }
52+
53+        cmd = query_args " " file
54+        while ((cmd | getline line) > 0) {
55+                print line
56+        }
57+        close(cmd)
58 }
59 
60 
61@@ -56,4 +65,5 @@ function sanitize(str) {
62     gsub(/\.\./, "", str)
63     
64     return str
65-}
66+} 
67+
68diff --git a/hello.sh b/hello.sh
69new file mode 100755
70index 0000000..5ec03ba
71--- /dev/null
72+++ b/hello.sh
73@@ -0,0 +1,3 @@
74+#/bin/sh
75+
76+echo "Hello"