aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-12-29 21:25:13 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-12-29 21:25:13 +0000
commit3c9fd01ad8fc4d4c555bdde1d28a97e57c51af0c (patch)
tree3b6d040b25502e1aa3fe54e1f9c8ee09a4b5e3d1
parent96c614083ef4c7143e368fa483753401f9df9703 (diff)
downloadpandoc-3c9fd01ad8fc4d4c555bdde1d28a97e57c51af0c.tar.gz
+ 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
-rw-r--r--Makefile4
-rw-r--r--web/mkdemos.sh (renamed from web/demos.sh)8
2 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 10c67c0b1..d2978599f 100644
--- a/Makefile
+++ b/Makefile
@@ -344,7 +344,7 @@ make_page:=./$(MAIN) -s -B $(web_src)/header.html \
-H $(web_src)/css
cleanup_files+=$(web_dest)
website: $(web_dest)
-$(web_dest)/: $(MAIN) html
+$(web_dest)/: $(MAIN) html
-rm -rf $(web_dest)
( \
mkdir $(web_dest); \
@@ -369,7 +369,7 @@ $(web_dest)/: $(MAIN) html
cp $(web_src)/S5DEMO $(web_dest)/ ; \
cp $(web_src)/header.html $(web_dest)/ ; \
cp $(web_src)/footer.html $(web_dest)/ ; \
- sh $(web_src)/demos.sh $(web_dest) | \
+ sh $(web_src)/mkdemos.sh $(web_dest) $(abspath .) | \
$(make_page) > $(web_dest)/demos.html; \
) || { rm -rf $(web_dest); exit 1; }
diff --git a/web/demos.sh b/web/mkdemos.sh
index bd87151d5..e33c464f8 100644
--- a/web/demos.sh
+++ b/web/mkdemos.sh
@@ -1,8 +1,10 @@
#!/bin/sh -e
# creates demo page for pandoc
-# argument is the destination directory
+# argument #1 is the destination directory
+# argument #2 is the directory containing pandoc, html2markdown, markdown2pdf
DEST=$1
+PROGPATH=$2
NEWLINE='
'
@@ -24,7 +26,7 @@ set -- $DEMOS
IFS=$oldifs
cd $DEST
-PATH=../..:$PATH
+PATH=$PROGPATH:$PATH
echo '% Pandoc demos
@@ -34,7 +36,7 @@ click on the name of the output file:
'
num=0
for command in "$@"; do
- num=$((num + 1))
+ num=$(($num + 1))
command=$(echo $command | sed -e "s/0/$num/")
firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/')
input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/')