Permalink
Browse files

better handling of spaces in paths

  • Loading branch information...
1 parent a96c704 commit 5dc6fc1fe129d9bce778cc927e98810729dc7aac @fletcher committed Apr 28, 2011
Showing with 12 additions and 12 deletions.
  1. +5 −5 bin/mmd-xslt
  2. +1 −1 bin/mmd2RTF.pl
  3. +2 −2 bin/mmd2tex-xslt
  4. +1 −1 bin/opml2mmd
  5. +3 −3 bin/opml2tex
View
@@ -45,7 +45,7 @@ then
# Need a temporary file
file_name=`mktemp mmdtempXXXX.txt`
- cat > $file_name
+ cat > "$file_name"
# Determine stylesheet to use
mode=`chooseXsltForFilename "$file_name"`
@@ -54,16 +54,16 @@ then
then
multimarkdown "$file_name"
else
- multimarkdown "$file_name" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode -
+ multimarkdown "$file_name" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" -
fi
shift
- rm $file_name
+ rm "$file_name"
else
until [ "$*" = "" ]
do
# process each argument separately
- file_name=`echo $1| sed 's/\.[^.]*$//'`
+ file_name=`echo "$1" | sed 's/\.[^.]*$//'`
# Determine stylesheet to use
mode=`chooseXsltForFilename "$1"`
@@ -72,7 +72,7 @@ do
then
multimarkdown "$1" > "$file_name.html"
else
- multimarkdown "$1" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode - > "$file_name.html"
+ multimarkdown "$1" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" - > "$file_name.html"
fi
shift
View
@@ -21,7 +21,7 @@
until [ "$*" = "" ]
do
# process each argument separately
- file_name=`echo $1| sed 's/\.[^.]*$//'`
+ file_name=`echo "$1"| sed 's/\.[^.]*$//'`
multimarkdown "$1" | textutil -convert rtf -stdin -stdout > "$file_name.rtf"
shift
done
View
@@ -62,7 +62,7 @@ then
# Determine stylesheet to use
mode=`chooseXsltForFilename "$file_name"`
- multimarkdown "$file_name" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode -
+ multimarkdown "$file_name" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" -
shift
rm $file_name
@@ -75,7 +75,7 @@ do
# Determine stylesheet to use
mode=`chooseXsltForFilename "$1"`
- multimarkdown "$1" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode - > "$file_name.tex"
+ multimarkdown "$1" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" - > "$file_name.tex"
shift
done
fi
View
@@ -25,7 +25,7 @@ else
until [ "$*" = "" ]
do
# process each argument separately
- file_name=`echo $1| sed 's/\.[^.]*$//'`
+ file_name=`echo "$1"| sed 's/\.[^.]*$//'`
# XSLT to convert OPML to MMD
xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" "$1" > "$file_name.txt"
View
@@ -18,17 +18,17 @@ then
# No arguments, so use stdin/stdout
# XSLT to convert OPML to MMD, then use MMD to create LaTeX
- xsltproc -nonet -novalid $xslt_path/../XSLT/opml2mmd.xslt - | multimarkdown -t latex
+ xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" - | multimarkdown -t latex
shift
else
until [ "$*" = "" ]
do
# process each argument separately
- file_name=`echo $1| sed 's/\.[^.]*$//'`
+ file_name=`echo "$1" | sed 's/\.[^.]*$//'`
# XSLT to convert OPML to MMD, then use MMD to create LaTeX
- xsltproc -nonet -novalid $xslt_path/../XSLT/opml2mmd.xslt "$1" | multimarkdown -t latex > "$file_name.tex"
+ xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" "$1" | multimarkdown -t latex > "$file_name.tex"
shift
done

0 comments on commit 5dc6fc1

Please sign in to comment.