Add automatic updates for env-termuc now that it's working in env-shared.

This commit is contained in:
2026-05-06 17:52:02 -07:00
parent 2de6e77d40
commit 6834d85fc2

View File

@@ -360,26 +360,35 @@ alias prod-pull="pull_prod_backups"
eval "$(declare -F | grep -v _ | sed 's/-f /-fx /')" eval "$(declare -F | grep -v _ | sed 's/-f /-fx /')"
# Run update checker in background. # Run update checker in background.
( if [[ -d "$PROJECT_TERMUX" ]]; then (
git -C "$PROJECT_TERMUX" fetch >/dev/null 2>&1 \ (
&& git -C "$PROJECT_TERMUX" status \ if [[ -d "$PROJECT_TERMUX" ]]; then
| grep "is behind" \ git -C "$PROJECT_TERMUX" fetch >/dev/null 2>&1 \
| while read status; do && git -C "$PROJECT_TERMUX" status \
#log "\n\n`date` - env-termux has has been improved." | grep "is behind" \
#log " '$status'" | while read status; do
#log "\n\n`date` - Run 'reload-termux' to update." title=TBD
message=TBD
title="env-termux Updates Available" success=0
message="Update with 'reload-termux'." reload-termux || success=1
if [[ -d /sdcard ]]; then if [[ $success == 0 ]]; then
termux-notification \ title="env-termux Updated"
-t "$title" \ message="Reloaded automatically, please reload BASH. :)"
-c "$message" else
else title="env-termux Updates Available"
notify-send "$title" "$message" message="Update with 'reload-termux'."
fi
if [[ -d /sdcard ]]; then
termux-notification \
-t "$title" \
-c "$message"
else
notify-send "$title" "$message"
fi
done
fi fi
done ) >> "$HOME"/Reports/env-termux.log 2>&1 &
fi & ) )
# Complete! # Complete!
PROG="$(basename -- "${BASH_SOURCE[0]}")" PROG="$(basename -- "${BASH_SOURCE[0]}")"