From 2c7331bed9c71e21bc25f33d925e43e0e1ea14f3 Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 21 Mar 2023 15:51:22 -0400 Subject: [PATCH] New generic install method --- installJRMC | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/installJRMC b/installJRMC index 8a03b9a..5f52a77 100755 --- a/installJRMC +++ b/installJRMC @@ -870,22 +870,15 @@ installMCGENERIC() { tar xvf "control.tar.xz" &>/dev/null echo "You must install the following dependencies manually:" grep -i "Depends:" control - raw_files=("$(tar xvf data.tar.xz)") - # List of files to install - #raw_files=("$(find etc/ usr/ -mindepth 1 -type f)") - debug "raw_files=(${raw_files[*]})" + readarray -t raw_files < <(tar xvf data.tar.xz) # Output to log file - echo "${raw_files[@]/^.\//\/}" >> "$SCRIPTDIR/.uninstall" - # for f in "${raw_files[@]}"; do - # echo "/${f" - # echo "/$f" >> "$SCRIPTDIR/.uninstall" - # done + echo "${raw_files[@]/#./}" >> "$SCRIPTDIR/.uninstall" # Manually install files for f in "${raw_files[@]}"; do - execute sudo cp -a "$f" "/" + execute sudo cp -a "$f" "${f/#./}" done popd &>/dev/null || return - debug || execute rm -rf "$extract_dir" + execute rm -rf "$extract_dir" return 0 }