From 079d70014e3a49851a235de6283f4f642f8959e3 Mon Sep 17 00:00:00 2001 From: Botspot Date: Mon, 2 Nov 2020 17:55:54 -0600 Subject: [PATCH] Updater copy new files not in terminal --- updater | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/updater b/updater index 3b9927a..445cfdf 100755 --- a/updater +++ b/updater @@ -158,33 +158,32 @@ button=$? #get exit code to determine which button was pressed echo "Button: ${button}" [ ! "$button" -eq 0 ] && error 'User cancelled' #exit now if anything but Update was clicked - -x-terminal-emulator --title='Updating apps...' -e ' -bash -c '\'' -DIRECTORY="'"$DIRECTORY"'" -mainupdate="'"$mainupdate"'" -updatable="'"$updatable"'" -trap "sleep 10" EXIT -PREIFS="$IFS" -IFS="|" -for i in $updatable -do - "${DIRECTORY}/manage" update "$i" nofetch - echo -e "\e[92m${i} was updated successfully.\e[39m" -done - for i in $mainupdate do mkdir -p "$(dirname "${DIRECTORY}/${i}")" #copy new version to apps/ - cp -f "${DIRECTORY}/update/pi-apps/${i}" "${DIRECTORY}/${i}" || error \"Failed to copy ${DIRECTORY}/update/pi-apps/"${i}"! + cp -f "${DIRECTORY}/update/pi-apps/${i}" "${DIRECTORY}/${i}" || echo "\e[91mFailed to copy ${DIRECTORY}/update/pi-apps/${i}\e[39m!" echo -e "\e[92m${i} was updated successfully.\e[39m" done -IFS="$PREIFS" -echo -e "\e[92mAll updates complete. Closing in 10 seconds.\e[39m" -'\'' + +x-terminal-emulator --title='Updating apps...' -e ' + bash -c '\'' + DIRECTORY="'"$DIRECTORY"'" + mainupdate="'"$mainupdate"'" + updatable="'"$updatable"'" + trap "sleep 10" EXIT + PREIFS="$IFS" + IFS="|" + for i in $updatable + do + "${DIRECTORY}/manage" update "$i" nofetch + echo -e "\e[92m${i} was updated successfully.\e[39m" + done + IFS="$PREIFS" + echo -e "\e[92mAll updates complete. Closing in 10 seconds.\e[39m" + '\'' ' #.git folder