From 65e6b0badd2b9b73b10c40134f03b0f54114aace Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 16 Jul 2020 10:27:39 +0000 Subject: pkg_fetch: replace hooks when updating repositories. - Rename *-pull to *-fetch - Do not run the hook for every single repository, run it only once FossilOrigin-Name: 7d45e6b465e91f19758072f28306c1fbf32ce8a55e1fe1145592bffd8910f97a --- kiss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 7667916..89d310a 100755 --- a/kiss +++ b/kiss @@ -1216,6 +1216,8 @@ pkg_install() { pkg_fetch() { log "Updating repositories" + run_hook pre-fetch + # Create a list of all repositories. # See [1] at top of script. # shellcheck disable=2046,2086 @@ -1252,8 +1254,6 @@ pkg_fetch() { *) log "$PWD" " " ;; esac - run_hook pre-pull '' "$PWD" - if [ -w "$PWD" ] && [ "$uid" != 0 ]; then git fetch git merge @@ -1285,8 +1285,6 @@ pkg_fetch() { user=$user as_root sh -c "$git_cmd" ) fi - - run_hook post-pull '' "$PWD" } elif [ -f .rsync ]; then read -r remote < .rsync @@ -1312,6 +1310,8 @@ pkg_fetch() { printf '%s\n' "Not a remote repository, skipping." fi done + + run_hook post-fetch } pkg_updates(){ -- cgit v1.2.3