aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/mkdemos.sh (renamed from web/demos.sh)8
1 files changed, 5 insertions, 3 deletions
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/')