hopefully updater is fixed now

pull/61/head
Botspot 5 years ago
parent bb14f041ae
commit 036e9765d0

@ -158,38 +158,33 @@ button=$? #get exit code to determine which button was pressed
echo "Button: ${button}" echo "Button: ${button}"
[ ! "$button" -eq 0 ] && error 'User cancelled' #exit now if anything but Update was clicked [ ! "$button" -eq 0 ] && error 'User cancelled' #exit now if anything but Update was clicked
updatable="$(echo "$updatable" | tr '|' '!')"
mainupdate="$(echo "$mainupdate" | tr '|' '!')"
lxterminal --title="Updating Pi-Apps..." -e " lxterminal --title='Updating apps...' -e '
trap 'sleep 30' EXIT trap "sleep infinity" EXIT
PREIFS=\"$IFS\" PREIFS="$IFS"
IFS='!' IFS="|"
for i in $updatable for i in '$updatable'
do do
\"${DIRECTORY}/manage\" update \"$i\" nofetch "${DIRECTORY}/manage" update "$i" nofetch
echo -e \"\e[92m${i} was updated successfully.\e[39m\" echo -e "\e[92m${i} was updated successfully.\e[39m"
done done
for i in $mainupdate for i in '$mainupdate'
do do
#move old program to trash mkdir -p "$(dirname "'${DIRECTORY}'/${i}")"
gio trash \"${DIRECTORY}/${i}\" 2>/dev/null
mkdir -p \"$(dirname "${DIRECTORY}/${i}")\"
#copy new version to apps/ #copy new version to apps/
cp -f \"${DIRECTORY}/update/pi-apps/${i}\" \"${DIRECTORY}/${i}\" cp -f "'${DIRECTORY}'/update/pi-apps/${i}" "'${DIRECTORY}'/${i}" || error \"Failed to copy '${DIRECTORY}'/update/pi-apps/"${i}"!
echo -e \"\e[92m${i} was updated successfully.\e[39m\" echo -e "\e[92m${i} was updated successfully.\e[39m"
done done
IFS=\"$PREIFS\" IFS="$PREIFS"
'
#.git folder
#move old .git folder to trash #move old .git folder to trash
gio trash \"${DIRECTORY}/.git\" 2>/dev/null gio trash "${DIRECTORY}/.git" 2>/dev/null
#copy new .git folder cp -rf "${DIRECTORY}/update/pi-apps/.git" "${DIRECTORY}/.git" || error "Failed to copy new .git!"
cp -rf \"${DIRECTORY}/update/pi-apps/.git\" \"${DIRECTORY}/.git\"
"
sleep 1 sleep 1
while ps -C manage >/dev/null;do sleep 0.1; done while ps -C manage >/dev/null;do sleep 0.1; done

Loading…
Cancel
Save