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.
This commit is contained in:
18
install.sh
18
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..."
|
||||
|
||||
Reference in New Issue
Block a user