#!/usr/bin/env sh # Used in home server setup. # # GIT_BASE_PATH="/srv/git" path="$GIT_BASE_PATH/$1" prev="$(pwd)" echo "Creating directory in $path" mkdir -p "$path" cd "$path" || return echo "Setting up git files in $path" git init --bare --shared git config --file config http.receivepack true echo "Completed setup, returning to $prev" cd "$prev" || return echo "done"