Commit bec013c6e051204471c7640646d78c5d55616361

Thomas de Grivel 2023-02-04T13:20:00

shpkg_upgrade_shpkg

diff --git a/share/shpkg/shpkg.subr b/share/shpkg/shpkg.subr
index 14fefdd..c9ccecd 100644
--- a/share/shpkg/shpkg.subr
+++ b/share/shpkg/shpkg.subr
@@ -444,10 +444,18 @@ shpkg_uninstall () {
 }
 
 shpkg_upgrade () {
-    verbose 2 shpkg_pull "$@"
-    verbose 2 shpkg_build "$@"
-    verbose 2 shpkg_package "$@"
-    verbose 2 shpkg_install "$@"
+    verbose 2 shpkg_upgrade_shpkg
+    if [ $# -gt 0 ]; then
+        verbose 2 shpkg_pull "$@"
+        verbose 2 shpkg_build "$@"
+        verbose 2 shpkg_package "$@"
+        verbose 2 shpkg_install "$@"
+    fi
+}
+
+shpkg_upgrade_shpkg () {
+    ( verbose 1 cd "${SHPKG_DIR}" &&
+          verbose 1 git pull; )
 }
 
 # Clean