git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH Cogito] Copyright and document the cg script

From
Jonas Fonseca <fonseca@diku.dk>
Date
Oct 2, 2005, 10:13 UTC
Message-ID
<20051002101322.GC9219@diku.dk>

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
Message 1 of 1 in “Copyright and document the cg script”
  1. Copyright and document the cg scriptJonas Fonseca, Oct 2, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.