minor fixes and improvements
[distro-setup] / brc2
diff --git a/brc2 b/brc2
index cc6595072069882e8d640d42b396b4f105adc379..15f953909b6e2f790c28761d9053400c6a82260a 100644 (file)
--- a/brc2
+++ b/brc2
@@ -3736,7 +3736,7 @@ rgm() {
 # re all my files more expansively
 rem() {
   local paths
-  paths="/p/c /b"
+  paths="/p/c /b/"
   find $paths -not \( -name .svn -prune -o -name .git -prune \
        -o -name .hg -prune -o -name .editor-backups -prune \
        -o -name .undo-tree-history -prune \) 2>/dev/null | grep -iP --color=auto -- "$*" ||:
@@ -3980,6 +3980,34 @@ path-add --end --ifexists $HOME/.rvm/bin
 # so its included in overall env
 
 
+# ya, hacky hardcoded hostnames in 2023. we could do better
+hssh-update() {
+  local -a failed_hosts hosts
+  case $HOSTNAME in
+    sy|kd)
+      hosts=(
+        kd x3.office.fsf.org syw
+      )
+      ;;
+    x3)
+      hosts=(
+        b8.nz sywg.b8.nz
+      )
+      ;;
+  esac
+  for host in ${hosts[@]}; do
+    e $host
+    if ! scp /b/fai/fai/config/files/usr/local/bin/hssh/IANK root@$host:/usr/local/bin/hssh; then
+      failed_hosts+=($host)
+    fi
+  done
+  if (( ${#failed_hosts[@]} >= 1 )); then
+    echo failed_hosts=${failed_hosts[*]}
+    return 1
+  fi
+}
+
+
 export BASEFILE_DIR=/a/bin/fai-basefiles
 
 #export ANDROID_HOME=/a/opt/android-home