move func from brc2 to brc to get it in an ssh
authorIan Kelling <ian@iankelling.org>
Fri, 28 Nov 2025 10:06:05 +0000 (05:06 -0500)
committerIan Kelling <ian@iankelling.org>
Fri, 28 Nov 2025 10:06:05 +0000 (05:06 -0500)
brc
brc2

diff --git a/brc b/brc
index d583abdd70f5e731cbbbf9ac0cfecafe986b94d2..3043c2e8a88e74e0a9943b4d21c24e239de5085f 100644 (file)
--- a/brc
+++ b/brc
@@ -4634,6 +4634,21 @@ dtsort() {
   echo $(date +%j)---$day_mins
   }
 
+wgkey() {
+  local umask_orig name
+  if (( $# != 1 )); then
+    e expected 1 arg >&2
+    return 1
+  fi
+  name=$1
+  umask_orig=$(umask)
+  umask 0077
+  wg genkey | tee $name-priv.key | wg pubkey > $name-pub.key
+  umask $umask_orig
+}
+
+
+
 # * stuff that makes sense to be at the end
 
 # note, if we unset IFS, that will mess up completion scripts which
diff --git a/brc2 b/brc2
index 06490fcfff4c576b39551133d9b48706ab89032c..88781140daa8a196c3ec6f9542535651c05565de 100644 (file)
--- a/brc2
+++ b/brc2
@@ -2088,18 +2088,7 @@ kff() {
   popd
 }
 
-wgkey() {
-  local umask_orig name
-  if (( $# != 1 )); then
-    e expected 1 arg >&2
-    return 1
-  fi
-  name=$1
-  umask_orig=$(umask)
-  umask 0077
-  wg genkey | tee $name-priv.key | wg pubkey > $name-pub.key
-  umask $umask_orig
-}
+
 
 host-info-all() {
   hiup