🗝
summary refs log tree commit diff
path: root/cgit/new.sh
blob: 351e4aea4a588b54681ee364def0f60510f65851 (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