From: Jonas Fonseca <fonseca@diku.dk>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: [PATCH Cogito] Copyright and document the cg script
Date: Sun, 2 Oct 2005 12:13:22 +0200 [thread overview]
Message-ID: <20051002101322.GC9219@diku.dk> (raw)
Some distributions require all programs to be documented with a manpage so
add a small script header and generate cg(1).
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
commit 9356837de630644323c800e2accad2618d7393f9
tree bdd4c673b6086cee5d5b51ecdb8e2968212afcac
parent 5e15803563ef00720541e89ae16a633ac8dfb7d7
author Jonas Fonseca <fonseca@diku.dk> Thu, 29 Sep 2005 15:13:02 +0200
committer Jonas Fonseca <fonseca@stud1-9.itu.dk> Thu, 29 Sep 2005 15:13:02 +0200
Documentation/Makefile | 12 ++++++++----
cg | 24 ++++++++++++++++++++++++
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,7 +1,7 @@
CG_IGNORE=$(wildcard ../cg-X* ../cg-*.orig ../cg-*.rej)
-CG_SRC=$(filter-out $(CG_IGNORE), $(wildcard ../cg-*))
+CG_SRC=$(filter-out $(CG_IGNORE), $(wildcard ../cg*))
-MAN1_TXT=$(patsubst ../cg-%,cg-%.txt,$(CG_SRC))
+MAN1_TXT=$(patsubst ../cg%,cg%.txt,$(CG_SRC))
MAN7_TXT=cogito.txt
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT)) introduction.html
@@ -54,9 +54,9 @@ install-html: html
$(INSTALL) $(DOC_HTML) $(DESTDIR)/$(htmldir)
clean:
- rm -f *.xml *.html *.1 *.7 cg-*.txt cogito.txt
+ rm -f *.xml *.html *.1 *.7 cg*.txt cogito.txt
-.PRECIOUS: cg-%.txt
+.PRECIOUS: cg%.txt
introduction.html: ../README
asciidoc -b xhtml11 -d article -f asciidoc.conf -o $@ $<
@@ -73,5 +73,9 @@ introduction.html: ../README
cogito.txt : make-cogito-asciidoc
./make-cogito-asciidoc > $@
+# It seems that cg%.txt won't match this so use an explicit rule
+cg.txt : ../cg make-cg-asciidoc
+ ./make-cg-asciidoc $< > $@
+
cg-%.txt : ../cg-% make-cg-asciidoc
./make-cg-asciidoc $< > $@
diff --git a/cg b/cg
--- a/cg
+++ b/cg
@@ -1,4 +1,28 @@
#!/usr/bin/env bash
+#
+# Wrapper for running Cogito commands.
+# Copyright (c) Petr Baudis, 2005
+#
+# Takes a variable number of arguments where the first argument should
+# either be a Cogito command or one of the supported options. If no
+# arguments are specified an overview of all the Cogito commands will be
+# shown.
+#
+# Enables all Cogito commands to be accessed as subcommands, for example
+# is:
+#
+# cg help
+# cg-help
+#
+# equivalent.
+#
+# OPTIONS
+# -------
+# --version::
+# Show the version of the Cogito toolkit. Equivalent to the output
+# of `cg-version`.
+
+USAGE="cg [--version | COMMAND [ARGS]...]"
cmd="$1"; shift
case "$cmd" in
--
Jonas Fonseca
reply other threads:[~2005-10-02 10:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051002101322.GC9219@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).