From 49d26b3da112484cb89fff18f755f2bff6a7fb80 Mon Sep 17 00:00:00 2001 From: bryan Date: Thu, 16 Jun 2022 15:58:24 -0400 Subject: [PATCH] Syntax cleanup --- installJRMC | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/installJRMC b/installJRMC index 22ac89b..1ddc350 100755 --- a/installJRMC +++ b/installJRMC @@ -306,10 +306,10 @@ getVersion() { elif installPackage --silent buildah && cnt=$(buildah from debian:$BASE) &>/dev/null && buildah run "$cnt" -- bash -c \ - "echo 'deb [trusted=no arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $BASE main' > /etc/apt/sources.list 2>&1" && + "echo 'deb [trusted=no arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $BASE main' > /etc/apt/sources.list 2>&1" &>/dev/null && buildah run "$cnt" -- bash -c \ - "apt update --allow-insecure-repositories &>/dev/null" && - MCVERSION=$(buildah run "$cnt" -- apt-cache policy mediacenter?? | grep Candidate | awk '{print $2}' | sort -V | tail -n1) && + "apt update --allow-insecure-repositories &>/dev/null" &>/dev/null && + MCVERSION=$(buildah run "$cnt" -- apt-cache policy mediacenter?? | grep Candidate | awk '{print $2}' | sort -V | tail -n1) &>/dev/null && [[ "$MCVERSION" =~ ([0-9]+.[0-9]+.[0-9]+) ]] && VERSION_SOURCE="containerized package manager"; then buildah rm "$cnt" &>/dev/null @@ -1386,8 +1386,10 @@ disableCoW() { declare mc_system_path="/usr/lib/jriver" declare mc_user_path="$HOME/.jriver" + [[ -d "$mc_user_path" ]] || mkdir -p "$mc_user_path" + for dir in "$mc_system_path" "$mc_user_path"; do - ! [[ -d "$dir" ]] && return + [[ -d "$dir" ]] || return if [[ $(stat -f -c %T "$dir") == "btrfs" ]] && ! lsattr -d "$dir" | cut -f1 -d" " | grep -q C; then echo "Disabling CoW for $dir"