From 4d53a201b41bf0716efdbc9ae2e50b4290f38ae5 Mon Sep 17 00:00:00 2001 From: Zane V Date: Sat, 15 Nov 2025 19:42:02 -0500 Subject: [PATCH] Update to version v0.1.2.a.7 and implement auto-update feature in install.sh - Updated index.html and version.txt to reflect the new release version v0.1.2.a.7. - Added an auto-update option in install.sh to streamline the update process without user prompts. - Modified terminal.py to support the new auto-update flag during updates. --- index.html | 2 +- install.sh | 18 ++++++++++++++++-- terminal.py | 7 +++++-- version.txt | 2 +- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index ebf0799..9437892 100644 --- a/index.html +++ b/index.html @@ -46,7 +46,7 @@

Current release

-

v0.1.2.a.6

+

v0.1.2.a.7

Supported families

diff --git a/install.sh b/install.sh index a8478af..8f27295 100755 --- a/install.sh +++ b/install.sh @@ -335,6 +335,12 @@ case "$1" in python3 "$ZDTT_DIR/terminal.py" ;; update) + # Check for auto-update flag + AUTO_UPDATE=false + if [[ "$2" == "--auto" ]] || [[ "$2" == "--yes" ]]; then + AUTO_UPDATE=true + fi + echo "Checking for updates..." echo "" @@ -369,8 +375,16 @@ case "$1" in else echo "🔔 Update available!" echo "" - read -p "Do you want to update now? (yes/no): " -r - echo "" + + # Auto-update if flag is set, otherwise prompt + if [ "$AUTO_UPDATE" = true ]; then + REPLY="yes" + echo "Auto-updating..." + echo "" + else + read -p "Do you want to update now? (yes/no): " -r + echo "" + fi if [[ $REPLY =~ ^[Yy][Ee][Ss]$ ]]; then echo "Updating ZDTT Terminal..." diff --git a/terminal.py b/terminal.py index 7c7358a..a06fe0b 100644 --- a/terminal.py +++ b/terminal.py @@ -1877,12 +1877,15 @@ ZDTT Terminal v{self.version} 'install.sh' ) + # Add --auto flag to enable auto-update (skip prompt) + update_args = ['update', '--auto'] + args + if zdtt_wrapper: - subprocess.run([zdtt_wrapper, 'update'] + args) + subprocess.run([zdtt_wrapper] + update_args) return if os.path.isfile(installer_script): - subprocess.run(['bash', installer_script, 'update'] + args) + subprocess.run(['bash', installer_script] + update_args) return print("Unable to locate the ZDTT updater.") diff --git a/version.txt b/version.txt index 3020f0c..4c37775 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.2.a.6 \ No newline at end of file +0.1.2.a.7 \ No newline at end of file