Syntax cleanup
This commit is contained in:
10
installJRMC
10
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"
|
||||
|
||||
Reference in New Issue
Block a user