equal
deleted
inserted
replaced
16 echo '<h1>Tips</h1>' |
16 echo '<h1>Tips</h1>' |
17 echo '<ul>' |
17 echo '<ul>' |
18 |
18 |
19 for file in *.rst *.txt; do |
19 for file in *.rst *.txt; do |
20 ext=${file##*.} |
20 ext=${file##*.} |
21 name=${file%.${ext}} |
21 [ "$ext" = "rst" ] && ext=html |
22 case $ext in |
22 name=${file%.*} |
23 txt) |
23 case "$1" in |
24 case "$1" in |
24 html) echo " <li><a href=\"$name.$ext\">$name</a>" ;; |
25 chm) printf ' <li><a href="%s.txt">%s</a>\n' $name $name ;; |
25 frame) echo " <li><a href=\"$name.$ext\" target=\"article\">$name</a>" ;; |
26 frame) printf ' <li><a href="%s.txt" target="article">%s</a>\n' $name $name ;; |
26 *) exit 1 ;; |
27 esac |
|
28 ;; |
|
29 rst) |
|
30 case "$1" in |
|
31 chm) printf ' <li><a href="%s.html">%s</a>\n' $name $name ;; |
|
32 frame) printf ' <li><a href="%s.html" target="article">%s</a>\n' $name $name ;; |
|
33 esac |
|
34 ;; |
|
35 esac |
27 esac |
36 done |
28 done |
37 |
29 |
38 echo '<p>' |
30 echo '<p>' |
39 echo '<address>' |
31 echo '<address>' |