#!/usr/bin/env bash current_path=$(realpath $0) hook_base=${current_path%/*} if [[ ! -e $hook_base/data/install ]]; then echo "Pinch not installed. Consider installing pinch using install.sh..." >&2 exit 1 fi if [[ -r $hook_base/data/old_cfg ]]; then old_cfg=$(cat $hook_base/data/old_cfg) git config --global core.hooksPath $old_cfg rm $hook_base/data/old_cfg else git config --global --unset core.hooksPath fi rm $hook_base/data/install echo "Pinch uninstalled..."