-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: golang
action: commit
revision:
path_from:
revision_from: 39eb1314e5f35cb5bf1b52cdddc441570697cdb1:
path_to:
revision_to:

git.thebackupbox.net

golang

git://git.thebackupbox.net/golang

commit 39eb1314e5f35cb5bf1b52cdddc441570697cdb1
Author: epoch <epoch@enzo.thebackupbox.net>
Date:   Sun Feb 7 21:01:35 2021 -0600

    added gopher-get

diff --git a/Makefile b/Makefile

index ce24f8d487fbb83d67fce1fbf761f245da98e347..

index ..81d7a601ad794520605e18e53e15594cbd375c62 100644

--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
 install:
 	install -t $(PREFIX)/bin gophermap2terminal
 	install -t $(PREFIX)/bin gopher
+	install -t $(PREFIX)/bin gopher-get
diff --git a/gopher-get b/gopher-get
new file mode 100755
index 0000000000000000000000000000000000000000..8fc080618c36092c869a3274f0d26d6ff5a2bcbe
--- /dev/null
+++ b/gopher-get
@@ -0,0 +1,8 @@
+#!/bin/sh
+### I *require* that the type identifier is separated from the path by a /
+### I'm not interested in hacks to work around this atm.
+domain="$(printf "%s\n" "$1" | uricut -d)"
+port="$(printf "%s\n" "$1" | uricut -P)"
+path="/$(printf "%s\n" "$1" | uricut -p | cut -d/ -f3-)"
+if [ ! "$port" ];then port=70;fi
+printf "%s\r\n" "$path" | nc $domain $port

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 15:03:37 2024