X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=05de0a3f1cf93cbc19db5213794c83b6a129807f;hb=1f027ea146ea6c62002a8f67f831273a5c431b52;hp=eae5aa93439b60f921cc061cacee567cf47d2c1f;hpb=6d1ec26482f86b0f2d9560ce3d04ea8c63297c25;p=distro-setup diff --git a/brc2 b/brc2 index eae5aa9..05de0a3 100644 --- a/brc2 +++ b/brc2 @@ -172,7 +172,7 @@ slemacs() { sle() { # sl emacs local f=/home/iank/.emacs.d/init.el - sl --sl-test-cmd ". /etc/os-release ; printf %s \${VERSION//[^a-zA-Z0-9]/}; test -e $f && stat -c%Y $f" --sl-test-hook slemacs "$@" + sl --sl-test-cmd "sed -rn '/^VERSION=/{s/^.*=//;s/[^[:alnum:]]//gp}' /etc/os-release; test -e $f && stat -c%Y $f" --sl-test-hook slemacs "$@" } ccomp ssh sle @@ -2639,6 +2639,7 @@ wgkey() { host-info-all() { host-info-update bindpushb8 + ssh iank@li.b8.nz conflink wrt-setup } @@ -2649,7 +2650,7 @@ host-info-all() { host-info-update() { local -A vpn_ips host_ips host_macs nonvpn_ips all_ips - local -a root_hosts nonroot_hosts + local -a root_hosts nonroot_hosts host_usbs # the hosts with no mac root_hosts=( bk je li b8.nz ) @@ -2689,9 +2690,11 @@ host-info-update() { else nonroot_hosts+=($host ${host}i) fi - host_ips[$host]=$ip - host_macs[$host]=$mac + if [[ $mac ]]; then + host_macs[$host]=$mac + fi + done