UNPKG

461 Bapplication/x-shView Raw
1#!/bin/sh
2
3DIRNAME=$(dirname "$0")
4CONFIG="$DIRNAME/.base.simple-git-hooks.json"
5NPM_BIN=$(npm bin)
6
7# NOTE(motss): This is a workaround for the fact that the `simple-git-hooks` does not support
8# custom configuration file.
9#
10# 1. To temporarily copy the configuration file to `pwd`
11cp "$CONFIG" ./.simple-git-hooks.json
12
13# 2. Run the `simple-git-hooks`
14"$NPM_BIN"/simple-git-hooks
15
16# 3. Remove the configuration file from `pwd`
17rm -rf ./.simple-git-hooks.json