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