From e8dd5e5abf7f4d72204d60aaac3ccb540aa904dc Mon Sep 17 00:00:00 2001 From: Julien Portalier Date: Tue, 9 Aug 2016 23:20:54 +0200 Subject: [PATCH] Remove confusion about postinstall script closes #116 closes #114 --- SPEC.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SPEC.md b/SPEC.md index b38e6c9f..4150a25f 100644 --- a/SPEC.md +++ b/SPEC.md @@ -194,13 +194,19 @@ development_dependencies: ### scripts -Shards may run scripts automatically after certain actions. Scripts are mere -shell commands, and can either download and/or compile a library for example. +Shards may run scripts automatically after certain actions. The scripts +themselves are mere shell commands. -Only the `postinstall` hook is supported, and is run after installing or -upgrading a dependency. More hooks may be added later on. +#### postinstall + +The `postinstall` hook of a dependency will be run whenever that dependency is +installed or upgraded in a project that requires it. This may be used to compile +a C library, to build tools to help working on the project, or anything else. + +The script will be run from the dependency's installation directory, for example +`libs/foo` for a Shard named `foo`. ```yaml scripts: - postinstall: cd src/scrypt && make + postinstall: cd src/libfoo && make ```