From 30b4d24afc0871194697860233fa0cd8c59dd102 Mon Sep 17 00:00:00 2001 From: protree Date: Thu, 26 Feb 2015 20:52:49 +0100 Subject: [PATCH 1/3] Allow spaces in Library Path Changed Parsing of Library Path to allow spaces in Library Path --- scripts/pairinghelper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pairinghelper.sh b/scripts/pairinghelper.sh index 6c196823..c1d05d0d 100755 --- a/scripts/pairinghelper.sh +++ b/scripts/pairinghelper.sh @@ -12,9 +12,9 @@ fi logfile=`awk '$1=="logfile"{print $3}' $conf_path` logfile="${logfile%\"}" logfile="${logfile#\"}" -library_path=`awk '$1=="directories"{print $4}' $conf_path` -library_path="${library_path%\"}" -library_path="${library_path#\"}" +library_path=`awk '$1=="directories"{print}' $conf_path` +library_path="${library_path#*\"}" +library_path="${library_path%%\"*}" if [ ! -f $logfile ]; then echo "Error: Couldn't find logfile in $logfile" From 5cea89a8d4b7419313289a0ce2ca5c0ba6d89005 Mon Sep 17 00:00:00 2001 From: protree Date: Thu, 26 Feb 2015 21:03:21 +0100 Subject: [PATCH 2/3] Fix Wrong Remote Name Name of remote in pair.remote was "-e $remote" Log: [2015-02-26 21:00:16] [ LOG] remote: Remote '-e remoteXX' not known from mDNS, ignoring Removing "-e" option works as expected. --- scripts/pairinghelper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pairinghelper.sh b/scripts/pairinghelper.sh index c1d05d0d..a3103cd6 100755 --- a/scripts/pairinghelper.sh +++ b/scripts/pairinghelper.sh @@ -56,7 +56,7 @@ if [ -z "$pin" ]; then fi echo "Writing pair.remote to $library_path..." -echo -e "$remote\n$pin" > "$library_path/pair.remote" +echo "$remote\n$pin" > "$library_path/pair.remote" sleep 1 echo "Removing pair.remote from library again..." rm "$library_path/pair.remote" From 044d25dbf1e597ee061f19bb35d32f486ce7f078 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 27 Feb 2015 23:01:15 +0100 Subject: [PATCH 3/3] Use printf instead of "echo -e" in pairinghelper.sh - should work across platforms --- scripts/pairinghelper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pairinghelper.sh b/scripts/pairinghelper.sh index a3103cd6..2033a159 100755 --- a/scripts/pairinghelper.sh +++ b/scripts/pairinghelper.sh @@ -56,7 +56,7 @@ if [ -z "$pin" ]; then fi echo "Writing pair.remote to $library_path..." -echo "$remote\n$pin" > "$library_path/pair.remote" +printf "$remote\n$pin" > "$library_path/pair.remote" sleep 1 echo "Removing pair.remote from library again..." rm "$library_path/pair.remote"