diff --git a/kiss b/kiss index a25ef47..de4ae22 100755 --- a/kiss +++ b/kiss @@ -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]'