Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added

  Failed to locate '--update'

    MAD_PATH=":/usr/local/share/mad:/usr/share/mad:." for remote pages
  • Loading branch information...
commit 0ee8a69f5ca8c453263dc12413a5025ed5fffe24 1 parent 136b30c
@tj authored
Showing with 29 additions and 0 deletions.
  1. +7 −0 Readme.md
  2. +21 −0 bin/mad
  3. +1 −0  share/mad/mad.md
View
7 Readme.md
@@ -13,6 +13,7 @@
Options:
+ -u, --update update remote mad-pages
-V, --version output cpm version
-h, --help output this help information
@@ -37,6 +38,12 @@
`mad(1)` pipes to `less(1)` so you get the same paging / searching
goodness that you expect from `man(1)`.
+## Page repository
+
+ [mad-pages](https://github.com/visionmedia/mad-pages) is a collection of
+ useful mad pages such as language operator precedence tables, http status
+ codes, mime type tables etc.
+
## Page lookup
Use the __MAD_PATH__ environment variable to control
View
21 bin/mad
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
VERSION="0.1.0"
+REMOTE=git@github.com:visionmedia/mad-pages.git
#
# Display <page> with lookup via MAD_PATH.
@@ -53,6 +54,23 @@ display_mad_usage() {
exit
}
+#
+# Install remote manuals.
+#
+
+install_all_remote() {
+ local path=/usr/local/share/mad
+ echo
+ echo " ... cloning repo"
+ cd /tmp
+ git clone --depth 1 $REMOTE mad-pages
+ cd mad-pages
+ for page in *.md; do
+ echo " ... installing $page"
+ cp -f $page $path/$page
+ done
+}
+
# file required
test $# -eq 0 && display_mad_usage
@@ -66,6 +84,9 @@ case $1 in
-h|--help|help)
display_mad_usage
;;
+ -u|--update)
+ install_all_remote
+ ;;
*)
display $1
;;
View
1  share/mad/mad.md
@@ -11,6 +11,7 @@
Options:
+ -u, --update update remote mad-pages
-V, --version output mad version
-h, --help output this help information
Please sign in to comment.
Something went wrong with that request. Please try again.