#!/bin/bash # # Git wrapper. # # Load functions LIB="`dirname $0`/../functions" source "$LIB" || exit 1 # Aditional parameters CWD="`pwd`" # Run git command shift # Set working folder if [ ! -z "$RELATIVE_PATH" ]; then WORK="$KEYDIR/$RELATIVE_PATH" else WORK="$BASEDIR" fi mkdir -p "$WORK" && cd "$WORK" && git $* cd "$CWD"