Git Product home page Git Product logo

kiss-hook's Introduction

kiss-hook manager

A directory based kiss-hook manager. I prefer to use this structure now after having a single script with tons of case statements. It was hard to read and hard to manage.

Installation

If you want to install this, copy (or symlink) the kiss-hook file to the directory you will be using as the hook directory. You will then need to set the $KISS_HOOK variable pointing to this script.

If you don't want to put this script to the hook directory, you can set the environment variable $KISS_HOOK_DIR pointing to that directory.

Same applies for the cpt-hook file and the hook variables.

Setting up hooks

For every hook, you can set up a directory or a single file with the name of the hook. You can add a file named lib to the hook directory which will be sourced for every hook. This is useful for using functions on multiple hook types.

For example with the post-build hook, if you have package specific configuration you create a directory named post-build/. In it you will have files for all packages that you want to hook into. If you are hooking gcc, sbase, and less you will have post-build/gcc post-build/sbase, and post-build/less files. If you also want a hook that will affect every package you will need to add post-build/post-build.

If you don't have a package specific hook, but you want a hook that will deal with every package (or a hook that doesn't even deal with packages), you can simply create a file for the hook.

Here is an example structure:

├── kiss-hook
├── lib
├── post-build
│   ├── gcc
│   ├── less
│   ├── post-build
│   └── sbase
├── post-install
│   └── linux
├── pre-build
└── pre-fetch

See my personal repository for a better example on the hooks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.