aboutsummaryrefslogtreecommitdiff
path: root/modules/git/git-shell-commands/init
blob: 7e92e5abba3733912a2ccf7c9dc6c24c8c037b3a (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env sh

REPO="$1"

if [ ! -f "$REPO/config" ]; then 
  mkdir -p "$REPO"
  cd "$REPO" || exit
  git init --bare --shared
  git config cgit.readme "main:README.md"
  touch git-daemon-export-ok
fi