#!/bin/bash WS_DIR=${!#} if [ -z "$WS_DIR" ]; then WS_DIR="." fi git clone --bare ${*: -$#:$#-1} $WS_DIR/.bare && echo "gitdir: ./.bare" > $WS_DIR/.git && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"