All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH Cogito] Copyright and document the cg script
@ 2005-10-02 10:13 Jonas Fonseca
  0 siblings, 0 replies; only message in thread
From: Jonas Fonseca @ 2005-10-02 10:13 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-02 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-02 10:13 [PATCH Cogito] Copyright and document the cg script Jonas Fonseca

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.