🗝
summary refs log tree commit diff
path: root/cgit/new.sh
blob: 25f11a19f82ecd73e18f2c2f6eab1e6e11e3e738 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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
fi