- # 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
- 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.
- s rsync -rlpchviog --relative "${opts[@]}" "$path" "root@$host:/";
-}
-
-# only run on desktop. simpler to keep this on one system.
-r2eadd() { # usage: name url
- # initial setup of rss2email:
- # r2e new r2e@iankelling.org
- # that initializes files, and sets default email.
- # symlink to the config doesn't work, so I copied it to /p/c
- # and then use cli option to specify explicit path.
- # Only option changed from default config is to set
- # force-from = True
- #
- # or else for a few feeds, the from address is set by the feed, and
- # if I fail delivery, then I send a bounce message to that from
- # address, which makes me be a spammer.
-
- r2e add $1 "$2" $1@r2e.iankelling.org
- # get up to date and don't send old entries now:
- r2e run --no-send $1
-}
-r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }
-
-rspicy() { # usage: HOST DOMAIN
- # connect to spice vm remote host. use vspicy for local host
- local port=$(ssh $1<<EOF
-sudo virsh dumpxml $2|grep "<graphics.*type='spice'" | \
- sed -rn "s/.*port='([0-9]+).*/\1/p"
-EOF
- )
- if [[ $port ]]; then
- spicy -h $1 -p $port
- else
- echo "error: no port found. check that the domain is running."
- fi
+ # eg. rlu -opts frodo /testpath
+ # relative paths will expanded with readlink -f.
+ opts=("${@:1:$#-2}") # 1 to last -2
+ path="${*:$#}" # last
+ host="${*:$#-1:1}" # last -1
+ if [[ $path == .* ]]; then
+ path=$(readlink -f $path)
+ fi
+ # rync here uses checksum instead of time so we dont mess with
+ # unison relying on time as much. g is for group, same reason
+ # to keep up with unison.
+ s rsync -rlpchviog --relative "${opts[@]}" "$path" "root@$host:/";