#!/bin/bash # shellcheck disable=SC2086,SC2162 set -e if [ -z "$1" ]; then echo missing name exit 1 fi read -n1 -p "Make public? " public echo set -x ssh git@asylum mkdir $1.git '&&' cd $1.git '&&' git init --bare ssh -t git@asylum rm $1.git/description '&&' micro $1.git/description if [ $public = y ]; then ssh git@asylum touch $1.git/git-daemon-export-ok ssh git@asylum rm -r .cache fi