From be579af656889581ff9dcf9e58e79bece461d1e9 Mon Sep 17 00:00:00 2001 From: bryan Date: Thu, 24 Apr 2025 13:18:06 -0400 Subject: [PATCH] Fix permissions and command chaining --- installJRMC | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/installJRMC b/installJRMC index 45c897a..0bdd7de 100755 --- a/installJRMC +++ b/installJRMC @@ -775,10 +775,12 @@ acquire_deb_new() { if ! (apt_mc_container && sudo buildah run "$CNT" -- sh -c " apt-get download --allow-unauthenticated mediacenter$MC_MVERSION" && - mnt="$(sudo buildah mount "$CNT")" - execute sudo find "$mnt" -maxdepth 1 -type f -name "*.deb" -exec cp {} "$MC_DEB" \; + mnt="$(sudo buildah mount "$CNT")" && + execute sudo find "$mnt" -maxdepth 1 -type f -name "*.deb" -exec cp {} "$MC_DEB" \; && execute sudo buildah umount "$CNT" && - execute sudo buildah rm "$CNT"); then + execute sudo buildah rm "$CNT" && + execute sudo chown "$USER:$USER" "$MC_DEB" && + [[ -f $MC_DEB ]]); then err "Failed to download DEB from containerized package manager" echo "Using legacy download method" # Define the repository search order