feat: auto-detect existing install and run update instead of fresh install

Re-running the install script now detects ~/.codeman/app/.git and
automatically updates instead of re-installing. Removes the separate
`bash -s update` instructions from README since it's no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-03-12 15:09:37 +01:00
co-authored by Claude Opus 4.6
parent 625d4976d3
commit e7ee5595c5
2 changed files with 8 additions and 6 deletions
+8 -1
View File
@@ -1355,5 +1355,12 @@ uninstall() {
case "${1:-}" in
update) update ;;
uninstall) uninstall ;;
*) main "$@" ;;
*)
if [[ -z "${1:-}" && -d "$INSTALL_DIR/.git" ]]; then
print_banner
update
else
main "$@"
fi
;;
esac