aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-07-16 10:27:39 +0000
committermerakor <cem@ckyln.com>2020-07-16 10:27:39 +0000
commit65e6b0badd2b9b73b10c40134f03b0f54114aace (patch)
treed92f89696d81580084b62a7f4d7ee1b0d69a4271 /kiss
parent807ebe04b8629532a638a18791981870ace48895 (diff)
downloadcpt-65e6b0badd2b9b73b10c40134f03b0f54114aace.tar.gz
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
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss8
1 files 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(){