# HG changeset patch # User Oleksandr Gavenko # Date 1320422926 -7200 # Node ID 59c7141df3b2f67065c268877501d84f6a65ca88 # Parent ef0805397b5b52a2af57619646b66df44b0cb518# Parent 9b2eb3c96d84356971bd5b3116cff4d0ba82898c merged diff -r 9b2eb3c96d84 -r 59c7141df3b2 Makefile --- a/Makefile Thu Nov 03 14:36:14 2011 +0200 +++ b/Makefile Fri Nov 04 18:08:46 2011 +0200 @@ -34,7 +34,9 @@ TXT_FILES := $(wildcard *.txt) HTML_DIR := tips-html -HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html +RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) +HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) \ + $(HTML_DIR)/index.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES)) CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp) @@ -53,9 +55,12 @@ $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR) $(RST2HTML) --stylesheet=rst.css $*.rst $@ -$(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR) +$(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR) ./index.sh frame >$@ +$(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR) + ./index.sh html >$@ + $(HTML_DIR)/%.html: %.html | $(HTML_DIR) cp $< $@ @@ -76,7 +81,7 @@ ./chm-hhc.sh >$@ $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR) - ./index.sh chm >$@ + ./index.sh html >$@ ################################################################ # Init targets. diff -r 9b2eb3c96d84 -r 59c7141df3b2 cmd.rst --- a/cmd.rst Thu Nov 03 14:36:14 2011 +0200 +++ b/cmd.rst Fri Nov 04 18:08:46 2011 +0200 @@ -96,6 +96,12 @@ $ for /f "tokens=1 delims=" %%s in (users.txt) do (echo %%S & command "%%S") >> outputfile.txt +Resize cmd window. +================== +:: + + cmd# mode CON: COLS=120 LINES=40 + Limits. ======= diff -r 9b2eb3c96d84 -r 59c7141df3b2 frame.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frame.html Fri Nov 04 18:08:46 2011 +0200 @@ -0,0 +1,10 @@ + + + + tips index + + + + + + diff -r 9b2eb3c96d84 -r 59c7141df3b2 index-frame.html --- a/index-frame.html Thu Nov 03 14:36:14 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - tips index - - - - - - diff -r 9b2eb3c96d84 -r 59c7141df3b2 index.sh --- a/index.sh Thu Nov 03 14:36:14 2011 +0200 +++ b/index.sh Fri Nov 04 18:08:46 2011 +0200 @@ -18,20 +18,12 @@ for file in *.rst *.txt; do ext=${file##*.} - name=${file%.${ext}} - case $ext in - txt) - case "$1" in - chm) printf '
  • %s\n' $name $name ;; - frame) printf '
  • %s\n' $name $name ;; - esac - ;; - rst) - case "$1" in - chm) printf '
  • %s\n' $name $name ;; - frame) printf '
  • %s\n' $name $name ;; - esac - ;; + [ "$ext" = "rst" ] && ext=html + name=${file%.*} + case "$1" in + html) echo "
  • $name" ;; + frame) echo "
  • $name" ;; + *) exit 1 ;; esac done