{"thread":{"id":"1996","subject":"[PATCH Cogito] Copyright and document the cg script","startedAt":"2005-10-02T10:13:22Z","lastAt":"2005-10-02T10:13:22Z","messageCount":1,"participants":["Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"9605","messageId":"20051002101322.GC9219@diku.dk","threadId":"1996","inReplyTo":null,"subject":"[PATCH Cogito] Copyright and document the cg script","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-10-02T10:13:22Z","receivedAt":"2005-10-02T10:13:22Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Some distributions require all programs to be documented with a manpage so\nadd a small script header and generate cg(1).\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n\n---\ncommit 9356837de630644323c800e2accad2618d7393f9\ntree bdd4c673b6086cee5d5b51ecdb8e2968212afcac\nparent 5e15803563ef00720541e89ae16a633ac8dfb7d7\nauthor Jonas Fonseca <fonseca@diku.dk> Thu, 29 Sep 2005 15:13:02 +0200\ncommitter Jonas Fonseca <fonseca@stud1-9.itu.dk> Thu, 29 Sep 2005 15:13:02 +0200\n\n Documentation/Makefile |   12 ++++++++----\n cg                     |   24 ++++++++++++++++++++++++\n 2 files changed, 32 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -1,7 +1,7 @@\n CG_IGNORE=$(wildcard ../cg-X* ../cg-*.orig ../cg-*.rej)\n-CG_SRC=$(filter-out $(CG_IGNORE), $(wildcard ../cg-*))\n+CG_SRC=$(filter-out $(CG_IGNORE), $(wildcard ../cg*))\n \n-MAN1_TXT=$(patsubst ../cg-%,cg-%.txt,$(CG_SRC))\n+MAN1_TXT=$(patsubst ../cg%,cg%.txt,$(CG_SRC))\n MAN7_TXT=cogito.txt\n \n DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT)) introduction.html\n@@ -54,9 +54,9 @@ install-html: html\n \t$(INSTALL) $(DOC_HTML) $(DESTDIR)/$(htmldir)\n \n clean:\n-\trm -f *.xml *.html *.1 *.7 cg-*.txt cogito.txt\n+\trm -f *.xml *.html *.1 *.7 cg*.txt cogito.txt\n \n-.PRECIOUS: cg-%.txt\n+.PRECIOUS: cg%.txt\n \n introduction.html: ../README\n \tasciidoc -b xhtml11 -d article -f asciidoc.conf -o $@ $<\n@@ -73,5 +73,9 @@ introduction.html: ../README\n cogito.txt : make-cogito-asciidoc\n \t./make-cogito-asciidoc > $@\n \n+# It seems that cg%.txt won't match this so use an explicit rule\n+cg.txt : ../cg make-cg-asciidoc\n+\t./make-cg-asciidoc $< > $@\n+\n cg-%.txt : ../cg-% make-cg-asciidoc\n \t./make-cg-asciidoc $< > $@\ndiff --git a/cg b/cg\n--- a/cg\n+++ b/cg\n@@ -1,4 +1,28 @@\n #!/usr/bin/env bash\n+#\n+# Wrapper for running Cogito commands.\n+# Copyright (c) Petr Baudis, 2005\n+#\n+# Takes a variable number of arguments where the first argument should\n+# either be a Cogito command or one of the supported options. If no\n+# arguments are specified an overview of all the Cogito commands will be\n+# shown.\n+#\n+# Enables all Cogito commands to be accessed as subcommands, for example\n+# is:\n+#\n+#\tcg help\n+#\tcg-help\n+#\n+# equivalent.\n+#\n+# OPTIONS\n+# -------\n+# --version::\n+#\tShow the version of the Cogito toolkit. Equivalent to the output\n+#\tof `cg-version`.\n+\n+USAGE=\"cg [--version | COMMAND [ARGS]...]\"\n \n cmd=\"$1\"; shift\n case \"$cmd\" in\n\n-- \nJonas Fonseca\n"}]}