Skip to content

Add self-updating functionality with smtty-update command#3

Merged
dillacorn merged 1 commit into
dillacorn:mainfrom
soltros:main
Nov 28, 2025
Merged

Add self-updating functionality with smtty-update command#3
dillacorn merged 1 commit into
dillacorn:mainfrom
soltros:main

Conversation

@soltros

@soltros soltros commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

Changes:

New Files:

  • smtty-update - Standalone updater script that fetches and installs the latest version from GitHub

Modified Files:

  • install.sh - Updated to install smtty-update alongside smtty and handle uninstallation

Features:

  • One-command updates: Users can run smtty-update to pull the latest version from https://github.com/dillacorn/smtty
  • Smart caching: Clones the repository to ~/.cache/smtty-update and reuses it for faster subsequent updates
  • Automatic backups: Creates timestamped backups of the current version before updating
  • User confirmation: Shows recent commits and asks for confirmation before proceeding
  • Self-updating: The updater updates itself along with smtty
  • Robust error handling: Handles network failures, corrupted cache, and missing dependencies gracefully
  • Colored output: User-friendly colored status messages (INFO, SUCCESS, WARNING, ERROR)
  • PREFIX support: Respects the same PREFIX environment variable as install.sh

Usage:

After installing smtty with ./install.sh, users can update at any time by running:

smtty-update

@dillacorn

dillacorn commented Nov 28, 2025

Copy link
Copy Markdown
Owner

We need to also update the uninstall.sh for this to be properly complete.

I reviewed it and I believe everything looks good.. Commiting to main branch

@dillacorn dillacorn merged commit f6d07ea into dillacorn:main Nov 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants