|
|
@ -158,33 +158,32 @@ 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
for i in $mainupdate
|
|
|
|
do
|
|
|
|
do
|
|
|
|
mkdir -p "$(dirname "${DIRECTORY}/${i}")"
|
|
|
|
mkdir -p "$(dirname "${DIRECTORY}/${i}")"
|
|
|
|
|
|
|
|
|
|
|
|
#copy new version to apps/
|
|
|
|
#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"
|
|
|
|
echo -e "\e[92m${i} was updated successfully.\e[39m"
|
|
|
|
done
|
|
|
|
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
|
|
|
|
#.git folder
|
|
|
|