diff options
Diffstat (limited to 'mkhint')
| -rwxr-xr-x | mkhint | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -404,6 +404,17 @@ update_hint_file() { echo; echo "==========================================" } +# Prompt to run slackrepo update after a hint file update +prompt_slackrepo() { + local pkg="$1" + local answer + read -r -p "Run 'slackrepo update $pkg'? [Y/n] " answer + answer="${answer:-Y}" + if [[ "$answer" =~ ^[Yy]$ ]]; then + slackrepo update "$pkg" + fi +} + # Delete a hint file (and .bak if present) delete_hint_file() { local file="$1" @@ -537,6 +548,7 @@ main() { update) check_wget update_hint_file "$HINT_FILE" "$VERSION" + prompt_slackrepo "$HINT_FILE" ;; new) if [[ -n "$VERSION" ]]; then |
