git.iko.soy/typeable/pandoc
on master help sign in
+ Renamed web/demos.sh to mkdemos.sh

+ Added parameter for directory containing executables + Changed arithmetic statement for portability. + Modified Makefile accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@315 788f1e2b-df1e-0410-8736-df70ead52e1b

commit3c9fd01ad8fc4d4c555bdde1d28a97e57c51af0c authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 29 Dec 2006, 21:25 (20 years ago) parent96c6140
2 files changed+7−5
Makefile+2−2 web/demos.sh → web/mkdemos.sh+5−3
Makefile+2−2
@@ -344,7 +344,7 @@ make_page:=./$(MAIN) -s -B $(web_src)/header.html \
344344 -H $(web_src)/css
345345cleanup_files+=$(web_dest)
346346website: $(web_dest)
347−$(web_dest)/: $(MAIN) html
347+$(web_dest)/: $(MAIN) html
348348 -rm -rf $(web_dest)
349349 ( \
350350 mkdir $(web_dest); \
@@ -369,7 +369,7 @@ $(web_dest)/: $(MAIN) html
369369 cp $(web_src)/S5DEMO $(web_dest)/ ; \
370370 cp $(web_src)/header.html $(web_dest)/ ; \
371371 cp $(web_src)/footer.html $(web_dest)/ ; \
372− sh $(web_src)/demos.sh $(web_dest) | \
372+ sh $(web_src)/mkdemos.sh $(web_dest) $(abspath .) | \
373373 $(make_page) > $(web_dest)/demos.html; \
374374 ) || { rm -rf $(web_dest); exit 1; }
375375
web/demos.sh → web/mkdemos.shrenamed+5−3
@@ -1,8 +1,10 @@
11#!/bin/sh -e
22# creates demo page for pandoc
3−# argument is the destination directory
3+# argument #1 is the destination directory
4+# argument #2 is the directory containing pandoc, html2markdown, markdown2pdf
45
56DEST=$1
7+PROGPATH=$2
68
79NEWLINE='
810'
@@ -24,7 +26,7 @@ set -- $DEMOS
2426IFS=$oldifs
2527
2628cd $DEST
27−PATH=../..:$PATH
29+PATH=$PROGPATH:$PATH
2830
2931echo '% Pandoc demos
3032
@@ -34,7 +36,7 @@ click on the name of the output file:
3436'
3537num=0
3638for command in "$@"; do
37− num=$((num + 1))
39+ num=$(($num + 1))
3840 command=$(echo $command | sed -e "s/0/$num/")
3941 firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/')
4042 input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/')