aboutsummaryrefslogtreecommitdiffstats
path: root/mkhint
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-05 10:27:06 +0200
committerDanilo M. <danix@danix.xyz>2026-06-05 10:27:06 +0200
commit2b3c7f80218d950c833df2f7be5cdf9da73e7988 (patch)
tree193609fc4ed26c344528e7a8d64f528e818f4d50 /mkhint
parent8284ac7c6948ffcb43a43eab7ef1ec50cbb6e820 (diff)
downloadmkhintfile-2b3c7f80218d950c833df2f7be5cdf9da73e7988.tar.gz
mkhintfile-2b3c7f80218d950c833df2f7be5cdf9da73e7988.zip
feat: prompt to run slackrepo after --hintfile update
Saves the round-trip of manually invoking slackrepo after every hint version bump. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'mkhint')
-rwxr-xr-xmkhint12
1 files changed, 12 insertions, 0 deletions
diff --git a/mkhint b/mkhint
index 62e6d05..3fa58f0 100755
--- a/mkhint
+++ b/mkhint
@@ -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