#!/usr/bin/env bash set -eu if [ "$#" -ne 1 ]; then echo "Hey man, give me your name !" echo "See, like this:" echo " $0 roberto" exit fi ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" CONFIG=${ROOT_DIR}"/gitconfig_$1" if [ ! -f "$CONFIG" ]; then echo "Your configuration file '${CONFIG}' does not exist. :(" echo "Create it in '${ROOT_DIR}'" exit fi git config --local include.path $CONFIG echo "Your git configuration '${CONFIG}' is well loaded. Enjoy !" echo "When job is done, don't forget to clean it:" echo " git-stop"