From c2f08682ed1121ab12d7e05e8cb1c1bf3d31d374 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 15 Dec 2016 12:41:56 -0500 Subject: [PATCH] +os/arch/bin/rsl --- os/arch/bin/rsl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 os/arch/bin/rsl diff --git a/os/arch/bin/rsl b/os/arch/bin/rsl new file mode 100755 index 00000000..78b6eae6 --- /dev/null +++ b/os/arch/bin/rsl @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Run resilio (bittorrent sync) from $HOME if it isn't running. Otherwise, open +# its gui in the browser. + +open="open" +[[ $OSTYPE == linux* ]] && open="xdg-open" +if pgrep rslsync >/dev/null; then + $open http://locahost:8888 +else + pushd $HOME >/dev/null + rslsync & + popd >/dev/null +fi