aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-31 12:09:44 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-31 12:09:44 +0000
commit156583a18433505db39c68888ded944c635a9633 (patch)
tree3e0e4598d66ee57fc8c1a76d4a37e9acb52f4ec4
parent729dbf3933c6a657b0524125f798dca34cc38c21 (diff)
downloadcpt-156583a18433505db39c68888ded944c635a9633.tar.gz
kiss: handle package manager upgrades first.
FossilOrigin-Name: a5623945c0281ff58ab388cefb1a66a1af01821cc5fb2b214398b222bf4efca8
-rwxr-xr-xkiss19
1 files changed, 19 insertions, 0 deletions
diff --git a/kiss b/kiss
index 1104617..5203511 100755
--- a/kiss
+++ b/kiss
@@ -894,6 +894,25 @@ pkg_updates() {
}
done
+ # If the package manager has an update, handle it first.
+ case $outdated in
+ *" kiss "*)
+ log "Detected package manager update" \
+ "The package manager will be updated first" \
+ "Continue?: Press Enter to continue or Ctrl+C to abort here"
+
+ read -r || exit
+
+ pkg_build kiss
+ args i kiss
+
+ log "Updated the package manager" \
+ "Re-run 'kiss update' to update your system"
+
+ exit 0
+ ;;
+ esac
+
# Disable globbing.
set -f