From cbff1bb2362ccc8532f8ef02aa9189134cbe6853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Wed, 5 Feb 2020 00:12:16 +0000 Subject: [PATCH] Update cmus script --- scripts/cmus-refresh.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/cmus-refresh.sh b/scripts/cmus-refresh.sh index 4945ea2..4461c35 100755 --- a/scripts/cmus-refresh.sh +++ b/scripts/cmus-refresh.sh @@ -2,6 +2,10 @@ # see https://github.com/cmus/cmus/issues/233 -cmus-remote -C clear -cmus-remote -C "add ~/Music" -cmus-remote -C "update-cache -f" +if cmus-remote -Q &>/dev/null ; then + cmus-remote -C clear + cmus-remote -C "add ~/Music" + cmus-remote -C "update-cache -f" +else + echo Start cmus first. +fi