From 60b9b370427b10efa4ced5b76af83d791a38059d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 20 Sep 2024 02:15:09 +0200 Subject: [PATCH] Trying to solve more issues. --- install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 20456b5..e5d2ba8 100755 --- a/install.sh +++ b/install.sh @@ -333,12 +333,7 @@ uncompress() { # List the files inside the tar and store them into a txt for running # chmod and chown selectively and for uninstalling it later on ${CMD_SUDO} tar -tf ${tmp} > ${install_tmp_list} - - # Remove first char of the list - ${CMD_SUDO} sed -i 's/^.//' ${install_tmp_list} - - # Store the install list itself - echo "${install_list}" | ${CMD_SUDO} tee -a ${install_tmp_list} > /dev/null + ${CMD_SUDO} chmod 666 ${install_tmp_list} # Uncompress the tarball ${CMD_SUDO} tar xzf ${tmp} -C / @@ -351,6 +346,12 @@ uncompress() { # Move the install list to the share directory mv "${install_tmp_list}" "${install_list}" + # Remove first char of the list + ${CMD_SUDO} sed -i 's/^.//' ${install_list} + + # Store the install list itself + echo "${install_list}" | ${CMD_SUDO} tee -a ${install_list} > /dev/null + # Give execution permissions and ownership ${CMD_SUDO} xargs -d '\n' -a ${install_list} -P 4 -I {} chmod 755 "{}" # TODO: Improve this and chmod only the real executable files ${CMD_SUDO} xargs -d '\n' -a ${install_list} -P 4 -I {} chown $(id -u):$(id -g) "{}"