From 03e0c5381bfe525f235dbd95f2ed1dda1a9a0eb6 Mon Sep 17 00:00:00 2001 From: rern Date: Thu, 11 Jan 2024 08:01:26 +0700 Subject: [PATCH] Update install.sh --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 59376ee2e..3af09f4ee 100644 --- a/install.sh +++ b/install.sh @@ -12,10 +12,13 @@ if [[ -e /usr/bin/camilladsp ]]; then systemctl stop camilladsp rm -f /etc/default/camilladsp /usr/lib/systemd/system/camilladsp.service pacman -Sy --needed --noconfirm camilladsp - readarray -t files <<< $( grep -rl enable_resampling $dircamilladsp ) - for f in "${files[@]}"; do - sed -i '/enable_resampling\|resampler_type/ d' "$f" - done + files=$( grep -rl enable_resampling $dircamilladsp ) + if [[ $files ]]; then + readarray -t files <<< $files + for f in "${files[@]}"; do + sed -i '/enable_resampling\|resampler_type/ d' "$f" + done + fi [[ -e $dirsystem/camilladsp ]] && systemctl start camilladsp fi fi