summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-06-10 13:08:14 -0700
committerKai Stevenson <kai@kaistevenson.com>2023-06-10 13:08:14 -0700
commit74216ab25f1400baf61fb9a1ae6b2063dca93f56 (patch)
tree8f8235d39dcc7cefdabd851f8a0345daa5696b9a
parent83e2ee60c937281937e968d8e6f32ba6961355fb (diff)
fixed ANSI escape on macos, fixed case where no local music exists
-rwxr-xr-xsyncmusic-interactive8
1 files 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))