1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 08:30:05 -07:00

kiss: update hook docs

This commit is contained in:
Dylan Araps 2021-07-15 07:20:31 +03:00
parent 7f537f7d31
commit e7f691d992
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

50
kiss
View File

@ -722,8 +722,8 @@ pkg_tar() (
log "$1" "Successfully created tarball" log "$1" "Successfully created tarball"
# type: post-package # arg1: post-package
# arg1: package name # arg2: package name
run_hook post-package "$1" run_hook post-package "$1"
) )
@ -792,9 +792,9 @@ pkg_build_all() {
pkg_find_version "$pkg" pkg_find_version "$pkg"
# type: pre-extract # arg1: pre-extract
# arg1: package name # arg2: package name
# arg2: path to DESTDIR # arg3: path to DESTDIR
run_hook pre-extract "$pkg" "$pkg_dir/$pkg" run_hook pre-extract "$pkg" "$pkg_dir/$pkg"
pkg_extract "$pkg" pkg_extract "$pkg"
@ -830,9 +830,9 @@ pkg_build() {
log "$1" "Starting build" log "$1" "Starting build"
# type: pre-build # arg1: pre-build
# arg1: package name # arg2: package name
# arg2: path to build directory # arg3: path to build directory
run_hook pre-build "$1" "$mak_dir/$1" run_hook pre-build "$1" "$mak_dir/$1"
# Attempt to create the log file early so any permissions errors are caught # Attempt to create the log file early so any permissions errors are caught
@ -860,9 +860,9 @@ pkg_build() {
log "$1" "Build failed" log "$1" "Build failed"
log "$1" "Log stored to $log_dir/$1-$time-$pid" log "$1" "Log stored to $log_dir/$1-$time-$pid"
# type: build-fail # arg1: build-fail
# arg1: package name # arg2: package name
# arg2: path to build directory # arg3: path to build directory
run_hook build-fail "$pkg" "$mak_dir/$1" run_hook build-fail "$pkg" "$mak_dir/$1"
pkg_clean pkg_clean
@ -879,9 +879,9 @@ pkg_build() {
log "$1" "Successfully built package" log "$1" "Successfully built package"
# type: post-build # arg1: post-build
# arg1: package name # arg2: package name
# arg2: path to DESTDIR # arg3: path to DESTDIR
run_hook post-build "$1" "$pkg_dir/$1" run_hook post-build "$1" "$pkg_dir/$1"
# Remove all .la files from package. # Remove all .la files from package.
@ -1311,9 +1311,9 @@ pkg_remove() {
# incomplete package installed. # incomplete package installed.
trap '' INT trap '' INT
# type: pre-remove # arg1: pre-remove
# arg1: package name # arg2: package name
# arg2: path to installed database # arg3: path to installed database
run_hook_pkg pre-remove "$1" run_hook_pkg pre-remove "$1"
run_hook pre-remove "$1" "$sys_db/$1" run_hook pre-remove "$1" "$sys_db/$1"
@ -1422,9 +1422,9 @@ pkg_install() {
pkg_installable "$pkg_name" "$tar_dir/$pkg_name/$pkg_db/$pkg_name/depends" pkg_installable "$pkg_name" "$tar_dir/$pkg_name/$pkg_db/$pkg_name/depends"
} }
# type: pre-install # arg1: pre-install
# arg1: package name # arg2: package name
# arg2: path to extracted package # arg3: path to extracted package
run_hook pre-install "$pkg_name" "$tar_dir/$pkg_name" run_hook pre-install "$pkg_name" "$tar_dir/$pkg_name"
pkg_conflicts "$pkg_name" pkg_conflicts "$pkg_name"
@ -1481,9 +1481,9 @@ pkg_install() {
# need to block 'Ctrl+C'. # need to block 'Ctrl+C'.
trap pkg_clean EXIT INT trap pkg_clean EXIT INT
# type: post-install # arg1: post-install
# arg1: package name # arg2: package name
# arg2: path to installed package database # arg3: path to installed package database
run_hook_pkg post-install "$pkg_name" run_hook_pkg post-install "$pkg_name"
run_hook post-install "$pkg_name" "$sys_db/$pkg_name" run_hook post-install "$pkg_name" "$sys_db/$pkg_name"
@ -1537,7 +1537,7 @@ pkg_update() {
contains "$repos" "$PWD" || { contains "$repos" "$PWD" || {
repos="$repos $PWD " repos="$repos $PWD "
# type: pre-update # arg1: pre-update
# env: PWD is path to repository # env: PWD is path to repository
run_hook pre-update run_hook pre-update
@ -1570,7 +1570,7 @@ pkg_update() {
as_root git submodule update --remote --init -f as_root git submodule update --remote --init -f
fi fi
# type: pre-update # arg1: pre-update
# env: PWD is path to repository # env: PWD is path to repository
run_hook post-update run_hook post-update
} }