From 74216ab25f1400baf61fb9a1ae6b2063dca93f56 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Sat, 10 Jun 2023 13:08:14 -0700 Subject: fixed ANSI escape on macos, fixed case where no local music exists --- syncmusic-interactive | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syncmusic-interactive b/syncmusic-interactive index b9d608d..f3fd8d6 100755 --- a/syncmusic-interactive +++ b/syncmusic-interactive @@ -2,9 +2,9 @@ REMOTE=root@canonical.aberrantflux.xyz REMOTEDIR=/srv/music LOCALDIR=$(pwd) -WHITE="\e[37m" -GREEN="\e[32m" -BLUE="\e[35m" +WHITE="\033[37m" +GREEN="\033[32m" +BLUE="\033[35m" rm /tmp/remotemusiclist rm /tmp/localmusiclist rm /tmp/localonlymusicd @@ -78,7 +78,7 @@ REMOTEONLYMUSIC=() while read p; do if [[ $p != "" ]] then - if ! grep -xq $p /tmp/localmusiclist + if [ $LOCALONLYCOUNT = 0 ] || grep -xq $p /tmp/localmusiclist then UNSYNCCOUNT=$((UNSYNCCOUNT+1)) REMOTEONLYCOUNT=$((REMOTEONLYCOUNT+1)) -- cgit v1.3.1