Author: Sean Lynch <firstname.lastname@example.org>
Date: Thu, 10 Oct 2019 12:49:10 -0700
Move files around, fix make-new-repo, and update the README.
7 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
@@ -1,13 +1,25 @@
# Generator for code.literati.org
-To use this, first pick a directory where you want to generate the
-HTML. Then create a bare repo to push the code into under that
-directory using `make-new-repo <repo name>`. This will create a bare
-repo named `<repo name>.git` and set up a post-update hook to make
-that repo clonable over a "dumb transport" like http as well as
-generate the index. It will also copy logo.png and style.css from the
-same directory as make-new-repo into the destination directory for the
-generated HTML, so replace those with your own if you want.
+The purpose of this project is to allow serving Git repositories from
+a static web server. To use it, clone this repo, then edit the file
+"url.m4" to point at where you will be hosting the files. Leave REPO
+as it is; that will be replaced with the name of each repository.
+Next, for each repository you want to serve code for, change to the
+local copy of the directory that you want the repositories to be
+hosted under and run `<clone dir>/make-new-repository <repo name>`.
+This will create a bare repo named `<repo name>.git` that you can push
+the code to and set up a post-update hook to make that repo clonable
+over a "dumb transport" like http as well as generate the index. It
+will also copy logo.png and style.css from the same directory as
+make-new-repo into the destination directory for the generated HTML,
+so replace those with your own if you want.
+Before pushing to the bare repo, edit the file "owner" in the root of
+the repo to contain the name and email of the repo maintainer (I'd
+recommend using a mailing list for group projects and accepting
+patches that way). Edit "description" to be a short description of the
Add the newly created bare repo as a remote to your working copy, then
push to it any time you want to update the HTML. Copy the files over
diff --git a/static/favicon.png b/favicon.png
Binary files differ.
diff --git a/static/logo.png b/logo.png
Binary files differ.
diff --git a/make-new-repo b/make-new-repo
@@ -1,11 +1,14 @@
scriptdir="$(dirname "$(realpath -se "$0")")"
for repo in $@
+ reponame="$(basename "$repo")"
git init --bare "$repo.git"
- m4 -D "SCRIPTDIR=$scriptdir" < "$scriptdir/post-update.hook" > "$hookdest"
+ m4 -D "SCRIPTDIR=$scriptdir" < "$scriptdir/post-update.m4" > "$hookdest"
chmod +x "$hookdest"
+ m4 -D "REPO=$reponame" < "$scriptdir/url.m4" > "$repo.git/url"
- cp "$SCRIPTDIR/logo.png" "$SCRIPTDIR/style.css" "$repo"
+ cp "$scriptdir/logo.png" "$scriptdir/style.css" "$repo"
diff --git a/post-update.hook b/post-update.m4
diff --git a/static/style.css b/style.css
diff --git a/url.m4 b/url.m4
@@ -0,0 +1 @@