shithub: bin.rc

Download patch

ref: 4f4b767fae09a76152d777ca1b5372218d6e5ff9
parent: b35806908757c20012985c8916d48456cd14e720
author: kvik <[email protected]>
date: Mon May 4 16:43:07 EDT 2020

srvq: switch to aux/getflags

--- a/bin/srvq
+++ b/bin/srvq
@@ -1,13 +1,11 @@
 #!/bin/rc
 rfork e
 
-fn usage {
-	>[2=1] echo $0 name service [proto]
-	exit usage
-}
+flagfmt=''; args='name [service [proto]]'
+eval `''{aux/getflags $*} || exec aux/usage
 
 if(test $#* -lt 1)
-	usage
+	exec aux/usage
 name=$1
 service=$2
 if(~ $#service 0)