shithub: rc

Download patch

ref: cf8d9a55f1f7e6ca384635ee9bcaaf2dfa08aba4
parent: 3e4f177fb3e100eaea33817ebbb4e373edb7e7b8
author: qwx <qwx@sciops.net>
date: Mon Apr 24 20:06:13 EDT 2023

gibmehrinap → gibmehrcinap, joke ruined

--- /dev/null
+++ b/bin/gibmehrcinap
@@ -1,0 +1,29 @@
+#!/bin/rc
+hget http://felloff.net/usr/cinap_lenrek/music \
+	| awk '
+/mp3/{
+	sub(".*<a href=\"","")
+	sub("\">.*\.mp3</a>","")
+	s = $1
+	sub("\.mp3$", "")
+	if($1 ~ /[^0-9][0-9]+$/)
+		sub("[0-9]+$", "")
+	d[$1] = d[$1] " " h[$1]
+	h[$1] = s
+}END{
+	for(i in h){
+		if(d[i] != " "){
+			split(d[i], a)
+			for(j in a){
+				if(system("test -f " a[j]) == 0){
+					print a[j] >"/fd/2"
+					system("rm " a[j])
+				}
+			}
+		}
+		if(system("test -f " h[i]) != 0)
+			print "http://felloff.net/usr/cinap_lenrek/music/" h[i]
+	}
+}
+' >list
+{tee list | xargs -n 256 dw} && rm list
--- a/bin/gibmehrinap
+++ /dev/null
@@ -1,29 +1,0 @@
-#!/bin/rc
-hget http://felloff.net/usr/cinap_lenrek/music \
-	| awk '
-/mp3/{
-	sub(".*<a href=\"","")
-	sub("\">.*\.mp3</a>","")
-	s = $1
-	sub("\.mp3$", "")
-	if($1 ~ /[^0-9][0-9]+$/)
-		sub("[0-9]+$", "")
-	d[$1] = d[$1] " " h[$1]
-	h[$1] = s
-}END{
-	for(i in h){
-		if(d[i] != " "){
-			split(d[i], a)
-			for(j in a){
-				if(system("test -f " a[j]) == 0){
-					print a[j] >"/fd/2"
-					system("rm " a[j])
-				}
-			}
-		}
-		if(system("test -f " h[i]) != 0)
-			print "http://felloff.net/usr/cinap_lenrek/music/" h[i]
-	}
-}
-' >list
-{tee list | xargs -n 256 dw} && rm list