blob: b8f73a5e9b9088b47cbed08803a11dcfae085c12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: new [REPO_NAME]"
echo "Tip: prefix with '.' to make private (e.g. new .dotfiles)"
exit 1
fi
if [ -d "$1.git" ]; then
echo "Repository $1 already exists"
exit 1
fi
git init --bare "$1.git"
echo "$1" > "$1.git/description"
echo "Created repository $1"
echo "Clone: git@forge.jan.systems:$1.git"
if [ "${1#.}" = "$1" ]; then
echo "Web: https://forge.jan.systems/$1.git"
fi
|