~aleteoryx/muditaos

7a1728935c8b245d7ccf449bb10fbbaec69bd36a — Radoslaw Wicik 5 years ago 4bdfb00
[EGD-4282] Add warnings in scripts on wrong pram usage
2 files changed, 18 insertions(+), 0 deletions(-)

M config/pre-commit.hook
M config/style_check_hook.sh
M config/pre-commit.hook => config/pre-commit.hook +13 -0
@@ 4,6 4,19 @@

#run pre-commit hooks

if [[ $# -ne 0 ]]; then
    cat <<-HELP_MSG &>1
	This script doesn't support any parameters.
	
	If you try to check style call:
	    ./config/style_check_hook.sh
	
	If you try to check license header call:
	    ./config/license_header_check.sh
	HELP_MSG
fi


set -e 
L_GIT_DIR=$(git rev-parse --show-toplevel)
pushd $L_GIT_DIR

M config/style_check_hook.sh => config/style_check_hook.sh +5 -0
@@ 175,6 175,11 @@ case "${1}" in
        FIX=true
        ;;
    *)
        if [[ $# -ne 0 ]]; then
            echo "unknown parameters: '$@'"
            help
            exit 1
        fi
        FILES=$(git diff-index --cached --name-only HEAD)
        LAST="Stage" 
        FIX=$(git config user.fixinstage)