From 7042fa00153ef0939e0d1b46d9eeb0374300a8d5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 8 Mar 2017 18:32:28 +0000 Subject: [PATCH] furl format --- src/freedombone-app-tahoelafs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index 24df909b..0512d455 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -490,8 +490,16 @@ function create_tahoelafs_client { sed -i 's|tub.location =.*|tub.location = disabled|g' $client_dir/tahoe.cfg } +function tahoelafs_parse_furl { + furl="$1" + furl_1=$(cat "$furl" | awk -F ' ' '{print $1}') + furl_2=$(cat "$furl" | awk -F ':' '{print $5}') + echo "${furl_1}:${furl_2}" +} + function get_tahoelafs_furl { - echo "$(cat /home/tahoelafs/storage/private/storage.furl)" + furl="$(cat /home/tahoelafs/storage/private/storage.furl)" + echo "$(tahoelafs_parse_furl \"$furl\")" } function get_tahoelafs_nick {