code

The code used to create this site.
git clone https://code.literati.org/code.git
Log | Files | Refs | README | LICENSE

make-new-repo (443B)


      1 #!/bin/sh
      2 set -e
      3 scriptdir="$(dirname "$(realpath -se "$0")")"
      4 for repo in $@
      5 do
      6     reponame="$(basename "$repo")"
      7     git init --bare "$repo.git"
      8     hookdest="$repo.git/hooks/post-update"
      9     m4 -D "SCRIPTDIR=$scriptdir" < "$scriptdir/post-update.m4" > "$hookdest"
     10     chmod +x "$hookdest"
     11     m4 -D "REPO=$reponame" < "$scriptdir/url.m4" > "$repo.git/url"
     12     mkdir "$repo"
     13     cp "$scriptdir/logo.png" "$scriptdir/style.css" "$repo"
     14 done