diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-03-05 15:59:47 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-03-05 15:59:47 +0000 |
commit | 39d4d6e92d960411a9a97f931a74d2cea2f0398b (patch) | |
tree | 30c8f091d9738245bf25e22071b6bb3393a8cb80 | |
parent | 639d28ce67fc8c00e3aacb49aa983ff696aa3776 (diff) | |
download | cpt-39d4d6e92d960411a9a97f931a74d2cea2f0398b.tar.gz |
kiss: Fix hook bug. Closes #118
FossilOrigin-Name: d08d48ebfaf6dec7ffc12280fe2c250b809efc11e453f5aa035136980a959c72
-rwxr-xr-x | kiss | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -83,9 +83,9 @@ pop() { run_hook() { [ "$KISS_HOOK" ] || return 0 - log "$pkg" "Running $1 hook" + log "$2" "Running $1 hook" - TYPE=$1 PKG=$pkg DEST=$pkg_dir/$pkg . "$KISS_HOOK" + TYPE=$1 PKG=$2 DEST=$3 . "$KISS_HOOK" } pkg_lint() { @@ -582,7 +582,7 @@ pkg_build() { log "$pkg" "Starting build" - run_hook pre-build + run_hook pre-build "$pkg" "$pkg_dir/$pkg" # Call the build script, log the output to the terminal # and to a file. There's no PIPEFAIL in POSIX shelll so @@ -590,7 +590,7 @@ pkg_build() { { "$repo_dir/build" "$pkg_dir/$pkg" 2>&1 || { log "$pkg" "Build failed" log "$pkg" "Log stored to $log_dir/$pkg-$time-$pid" - run_hook build-fail + run_hook build-fail "$pkg" "$pkg_dir/$pkg" pkg_clean kill 0 } } | tee "$log_dir/$pkg-$time-$pid" @@ -610,7 +610,7 @@ pkg_build() { log "$pkg" "Successfully built package" - run_hook post-build + run_hook post-build "$pkg" "$pkg_dir/$pkg" # Create the manifest file early and make it empty. # This ensures that the manifest is added to the manifest. @@ -938,7 +938,7 @@ pkg_install() { [ "$install_dep" ] && die "$1" "Package requires ${install_dep%, }" - run_hook pre-install + run_hook pre-install "$pkg_name" "$tar_dir/$pkg_name" pkg_conflicts "$tar_file" "$pkg_name" @@ -1315,7 +1315,7 @@ args() { l|list) pkg_list "$@" ;; u|update) pkg_updates ;; s|search) for pkg; do pkg_find "$pkg" all; done ;; - v|version) log kiss 1.7.4 ;; + v|version) log kiss 1.7.5 ;; h|help|-h|--help|'') log 'kiss [a|b|c|i|l|r|s|u|v] [pkg] [pkg] [pkg]' |