#!/bin/bash
# wrapper to make git remote command with ssh private key file
# http://alvinabad.wordpress.com/2013/03/23/how-to-specify-an-ssh-key-file-with-the-git-command/
#
# SYNTAX:
# gitwrapperssh.sh [keyfile] [command]
#

if [ -z "$PKEY" ]; then
    # if PKEY is not specified, run ssh using default keyfile
    ssh "$@"
else
    ssh -i ${PKEY} "$@"
fi