version/update system: version.sh, --update flag, UPDATE_MODULES, auto-detect existing install
This commit is contained in:
@@ -182,3 +182,30 @@ tui_fs_confirm_start() {
|
||||
[[ "$response" =~ ^[yY](es)?$ ]]
|
||||
return $?
|
||||
}
|
||||
|
||||
tui_fs_ask_update() {
|
||||
local date="$1"
|
||||
[[ "$TUI_FS_ACTIVE" -eq 0 ]] && return 1
|
||||
|
||||
tput cup 4 0 2>/dev/null || true
|
||||
tput ed 2>/dev/null || true
|
||||
|
||||
printf ' \033[1;36m┌─\033[0m \033[1;37mExisting Installation Found\033[0m\n'
|
||||
printf ' \033[1;36m│\033[0m\n'
|
||||
printf ' \033[1;36m│\033[0m Installed: \033[1;37m%s\033[0m\n' "$date"
|
||||
printf ' \033[1;36m│\033[0m Update applies new dotfiles, packages and config\n'
|
||||
printf ' \033[1;36m│\033[0m without re-running GPU/fresh-install setup.\n'
|
||||
printf ' \033[1;36m└─\033[0m\n'
|
||||
printf '\n'
|
||||
printf ' \033[1;36m?\033[0m Update existing installation? \033[1m[Y/n]\033[0m '
|
||||
|
||||
if ((OMERON_HAS_GUM)); then
|
||||
gum confirm "Update existing installation?"
|
||||
return $?
|
||||
fi
|
||||
|
||||
read -r response
|
||||
response="${response:-Y}"
|
||||
[[ "$response" =~ ^[yY](es)?$ ]]
|
||||
return $?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user