summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@enzo.thebackupbox.net>2021-04-29 21:44:13 +0000
committerepoch <epoch@enzo.thebackupbox.net>2021-04-29 21:44:13 +0000
commitef335722beec14e6bdb30e263629b3caa23e591b (patch)
tree5f9768b98959fb39aec7228c94b1030f61ab950d
parente2a9a693f60ee433ec405ef079aaa2a52536bcaa (diff)
downloaduritools-ef335722beec14e6bdb30e263629b3caa23e591b.tar.gz
uritools-ef335722beec14e6bdb30e263629b3caa23e591b.zip
urnstart now is just a short wrapper around urnresolve that passes the output straight to uristart
-rwxr-xr-xurnstart31
1 files changed, 2 insertions, 29 deletions
diff --git a/urnstart b/urnstart
index ec610c1..63d618c 100755
--- a/urnstart
+++ b/urnstart
@@ -1,29 +1,2 @@
-#!/bin/sh
-echo "what we're working on:" "$1"
-urn="$(printf '%s\n' "$1" | cut -d: -f1)"
-if [ "$urn" != "urn" ];then
- echo "this isn't a urn. wtf are you waking me up for? I'm going back to bed. fuck this shit."
- exit 1
-fi
-
-nid="$(printf '%s\n' "$1" | cut -d: -f2)"
-nss="$(printf '%s\n' "$1" | cut -d: -f3)"
-nss2="$(printf '%s\n' "$1" | cut -d: -f4-)"
-
-if [ "$nid" = "anonet" ];then
- if [ "$nss" = "asn" ];then
- uristart "whois://whois.ano/AS${nss2}"
- elif [ "$nss" = "ip4" -o "$nss" = "ip6" -o "$nss" = "dom" ];then
- uristart "whois://whois.ano/${nss2}"
- fi
-fi
-
-if [ "$nid" = "ietf" ];then
- if [ "$nss" = "rfc" ];then
- uristart gopher://thebackupbox.net:70/0/rfc/rfc${nss2}.txt
- fi
-fi
-
-if [ "$nid" = "xkcd" ];then
- uristart "https://xkcd.com/${nss}"
-fi
+#!/bin/bash
+exec uristart "$(urnresolve "$*")"