aboutsummaryrefslogtreecommitdiff
path: root/docs/cpt.org
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-03-24 09:43:33 +0000
committermerakor <cem@ckyln.com>2021-03-24 09:43:33 +0000
commita44a093a5d6c6ae62fb42ec8c9692b67be4ead40 (patch)
treec8aee3a4985b422812b750adf484465d57b2d05a /docs/cpt.org
parentf603dd5b4139cc1e7b2127eb1b9fcfe82d5176ba (diff)
downloadcpt-a44a093a5d6c6ae62fb42ec8c9692b67be4ead40.tar.gz
docs: update
FossilOrigin-Name: cbeda1da4581248561719a30276465343e56a60362a212a02dcd01ad42a39b3f
Diffstat (limited to 'docs/cpt.org')
-rw-r--r--docs/cpt.org35
1 files changed, 18 insertions, 17 deletions
diff --git a/docs/cpt.org b/docs/cpt.org
index 9ffa37a..0e59114 100644
--- a/docs/cpt.org
+++ b/docs/cpt.org
@@ -303,18 +303,18 @@ with the =*-mesa= suffix.
Hooks can be used in order to change the runtime behaviour of the package manager.
There are a variety of package hooks, mostly self explanatory:
-- pre-build
-- post-build
-- build-fail
-- pre-test
-- test-fail
-- pre-install
-- post-install
-- pre-remove
-- post-remove
-- pre-fetch
-- post-fetch
-- post-package
+- pre-build :: Run just before the ~build~ script is run
+- post-build :: Run after the ~build~ script is run successfully
+- build-fail :: Run if the ~build~ script fails
+- pre-test :: Run before the ~test~ script is run
+- test-fail :: Run if the ~test~ script fails
+- pre-install :: Run before a package is installed for each package
+- post-install :: Run after a package is installed for each package
+- pre-remove :: Run before a package is removed for each package
+- post-remove :: Run after a package is removed for each package
+- pre-fetch :: Run before all repositories are fetched
+- post-fetch :: Run after all repositories are fetched
+- post-package :: Run after a tarball for a package is created
In order to use hooks, you will need to set the =CPT_HOOK= variable pointing to
your hook file. Your hook file *MUST* be a POSIX shell script as its contents
@@ -322,11 +322,12 @@ are sourced by the package manager.
The hook is given 3 variables when it is executed. Those are:
-| Variable | Explanation |
-|----------+--------------------------------------------------------------|
-| =$TYPE= | The type of the hook, (=pre-build=, =post-build=, etc.) |
-| =$PKG= | The package that =cpt= is currently working on. Can be null. |
-| =$DEST= | The destination of the operation. Can be null. |
+- ~$TYPE~ ::
+ The type of the hook, (=pre-build=, =post-build=, etc.)
+- ~$PKG~ ::
+ The package that =cpt= is currently working on. Can be null.
+- ~$DEST~ ::
+ The destination of the operation. Can be null.
** Editing the build file during pre-build
:PROPERTIES: