#!/usr/bin/env bash

function real_path { echo $(cd $(dirname $1); pwd)/$(basename $1); }

from=$(real_path ./bin/pre-commit)
target=$(real_path ./.git/hooks/pre-commit)

if [ ! -f ${target} ]; then
  ln -s ${from} ${target}
fi

# Configure attribute
git config filter.phpcsfixer.clean ./bin/filters/clean.php
