more robust initialization, remove old func
[distro-setup] / brc
diff --git a/brc b/brc
index 69d54ad36ef79ac6b3e1ff2b23614b46620654b6..a71a7c763ec31cbbc6dbf51c8209ffbe097f88f9 100644 (file)
--- a/brc
+++ b/brc
@@ -300,21 +300,6 @@ b() {
     c -
 }
 
-bashrcpush () {
-    local startdir="$PWD"
-    cd ~
-    for x in "$@"; do
-        ssh $x mkdir -p bin/distro-functions/src
-        tar cz bin/semi-private bin/distro-functions/src | ssh $x tar xz
-    done
-    cd $(mktemp -d)
-    command cp /a/c/repos/bash/!(.git|..|.) ~/.gitconfig .
-    for x in "$@"; do
-        tar cz * | ssh $x tar xz
-    done
-    cd "$startdir"
-}
-
 bkrun() {
     # use -p from interactive shell
     btrbk-run -p "$@"
@@ -956,13 +941,16 @@ rlt() {
 }
 
 rlu() { # [OPTS] HOST PATH
-    # eg rlu -opts frodo /testpath
+    # eg. rlu -opts frodo /testpath
+    # relative paths will expanded with readlink -f.
     # useful for selectively sending dirs which have been synced with unison,
     # where the path is the same on both hosts.
     opts=("${@:1:$#-2}") #  1 to last -2
     path="${@:$#}" # last
     host="${@:$#-1:1}" # last -1
-    if [[ $path == .* ]]; then echo error: need absolut path; return 1; fi
+    if [[ $path == .* ]]; then
+        path=$(readlink -f $path)
+    fi
     # rync here uses checksum instead of time so we don't mess with
     # unison relying on time as much. g is for group, same reason
     # to keep up with unison.