Commit 8c2e573f authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

Avoid potential problems with filenames containing spaces.

parent 1ac2b1e3
...@@ -90,20 +90,20 @@ echo "working on ${EXTRA_PATH}$1" ...@@ -90,20 +90,20 @@ echo "working on ${EXTRA_PATH}$1"
if [ $# -eq 1 ] if [ $# -eq 1 ]
then then
if [ -d ${output}.junk ] if [ -d "${output}.junk" ]
then then
/bin/rm -rf ${output}.junk /bin/rm -rf "${output}.junk"
fi fi
if [ -d ${output} ] if [ -d "${output}" ]
then then
mv $output ${output}.junk mv "$output" "${output}.junk"
fi fi
echo "about to rename temporary directory to $output" echo "about to rename temporary directory to $output"
mv ${TMPDIR} $output mv "${TMPDIR}" "$output"
else else
cat $TMPDIR/* cat "$TMPDIR"/*
fi fi
rm -rf $TMPDIR rm -rf "$TMPDIR"
exit 0 exit 0
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
WWWDIR=www.winehq.com WWWDIR=www.winehq.com
## Want to put this into a sub-directory for easier maintenance ## Want to put this into a sub-directory for easier maintenance
if [ -e $WWWDIR ]; then if [ -e "$WWWDIR" ]; then
rm -rf $WWWDIR.old rm -rf "$WWWDIR.old"
mv $WWWDIR $WWWDIR.old mv "$WWWDIR" "$WWWDIR".old
fi fi
mkdir $WWWDIR mkdir "$WWWDIR"
## Create four-book HTML tarball ## Create four-book HTML tarball
echo "./db2html-winehq wine-user.sgml" echo "./db2html-winehq wine-user.sgml"
...@@ -36,13 +36,13 @@ echo "./db2html-winehq winelib-user.sgml" ...@@ -36,13 +36,13 @@ echo "./db2html-winehq winelib-user.sgml"
echo "./db2html-winehq wine-pkg.sgml" echo "./db2html-winehq wine-pkg.sgml"
./db2html-winehq wine-pkg.sgml ./db2html-winehq wine-pkg.sgml
tar czf winedoc-html.tgz wine-user wine-devel winelib-user wine-pkg tar czf winedoc-html.tgz wine-user wine-devel winelib-user wine-pkg
cp winedoc-html.tgz $WWWDIR cp winedoc-html.tgz "$WWWDIR"
## Create one-book HTML tarball ## Create one-book HTML tarball
echo "./db2html-winehq wine-doc.sgml" echo "./db2html-winehq wine-doc.sgml"
./db2html-winehq wine-doc.sgml ./db2html-winehq wine-doc.sgml
tar czf wine-set-html.tgz wine-doc tar czf wine-set-html.tgz wine-doc
cp wine-set-html.tgz $WWWDIR cp wine-set-html.tgz "$WWWDIR"
## Create PostScript tarball ## Create PostScript tarball
echo "db2ps -d ./print.dsl wine-user.sgml" echo "db2ps -d ./print.dsl wine-user.sgml"
...@@ -54,7 +54,7 @@ db2ps -d ./print.dsl winelib-user.sgml > /dev/null 2>&1 ...@@ -54,7 +54,7 @@ db2ps -d ./print.dsl winelib-user.sgml > /dev/null 2>&1
echo "db2ps -d ./print.dsl wine-pkg.sgml" echo "db2ps -d ./print.dsl wine-pkg.sgml"
db2ps -d ./print.dsl wine-pkg.sgml > /dev/null 2>&1 db2ps -d ./print.dsl wine-pkg.sgml > /dev/null 2>&1
tar czf winedoc-ps.tgz wine-user.ps wine-devel.ps winelib-user.ps wine-pkg.ps tar czf winedoc-ps.tgz wine-user.ps wine-devel.ps winelib-user.ps wine-pkg.ps
cp winedoc-ps.tgz $WWWDIR cp winedoc-ps.tgz "$WWWDIR"
## Create PDF tarball ## Create PDF tarball
echo "db2pdf -d ./print.dsl wine-user.sgml" echo "db2pdf -d ./print.dsl wine-user.sgml"
...@@ -66,12 +66,12 @@ db2pdf -d ./print.dsl winelib-user.sgml > /dev/null 2>&1 ...@@ -66,12 +66,12 @@ db2pdf -d ./print.dsl winelib-user.sgml > /dev/null 2>&1
echo "db2pdf -d ./print.dsl wine-pkg.sgml" echo "db2pdf -d ./print.dsl wine-pkg.sgml"
db2pdf -d ./print.dsl wine-pkg.sgml > /dev/null 2>&1 db2pdf -d ./print.dsl wine-pkg.sgml > /dev/null 2>&1
tar czf winedoc-pdf.tgz wine-user.pdf wine-devel.pdf winelib-user.pdf wine-pkg.pdf tar czf winedoc-pdf.tgz wine-user.pdf wine-devel.pdf winelib-user.pdf wine-pkg.pdf
cp winedoc-pdf.tgz $WWWDIR cp winedoc-pdf.tgz "$WWWDIR"
## Create SGML tarball ## Create SGML tarball
echo "Creating SGML package..." echo "Creating SGML package..."
tar czf winedoc-sgml.tgz *.sgml *.dsl *.ent db2html-winehq tar czf winedoc-sgml.tgz *.sgml *.dsl *.ent db2html-winehq
cp winedoc-sgml.tgz $WWWDIR cp winedoc-sgml.tgz "$WWWDIR"
## Done creating downloadable tarballs for users. Now we want to ## Done creating downloadable tarballs for users. Now we want to
## create a tarball of SHTML in a slightly different form, for the ## create a tarball of SHTML in a slightly different form, for the
...@@ -91,5 +91,5 @@ echo "./db2html-winehq winelib-user.sgml" ...@@ -91,5 +91,5 @@ echo "./db2html-winehq winelib-user.sgml"
echo "./db2html-winehq wine-pkg.sgml" echo "./db2html-winehq wine-pkg.sgml"
./db2html-winehq wine-pkg.sgml ./db2html-winehq wine-pkg.sgml
tar czf winehq-shtml.tgz wine-user wine-devel winelib-user wine-pkg tar czf winehq-shtml.tgz wine-user wine-devel winelib-user wine-pkg
cp winehq-shtml.tgz $WWWDIR cp winehq-shtml.tgz "$WWWDIR"
...@@ -70,8 +70,8 @@ $Q echo "done." ...@@ -70,8 +70,8 @@ $Q echo "done."
if [ -z "$FONTS" ]; then $Q echo "Can't find any fonts in $WIND"; exit 1; fi; if [ -z "$FONTS" ]; then $Q echo "Can't find any fonts in $WIND"; exit 1; fi;
mkdir $TMPDIR; mkdir "$TMPDIR"
cd $TMPDIR; cd "$TMPDIR"
for i in "${FONTS[@]}"; do for i in "${FONTS[@]}"; do
FNT=`basename "$i"`; FNT=${FNT%.???}; FNT=`basename "$i"`; FNT=${FNT%.???};
...@@ -89,7 +89,7 @@ for i in *.bdf; do ...@@ -89,7 +89,7 @@ for i in *.bdf; do
$Q echo "installing ${i%.???}.pcf"; $Q echo "installing ${i%.???}.pcf";
mv "${i%.???}.pcf" $TARGET 2>/dev/null mv "${i%.???}.pcf" $TARGET 2>/dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
$Q echo "Can't install fonts to $TARGET. Are your root?"; cd $OLDPWD; rm -rf $TMPDIR; exit 1; fi; $Q echo "Can't install fonts to $TARGET. Are your root?"; cd "$OLDPWD"; rm -rf "$TMPDIR"; exit 1; fi;
rm "$i"; rm "$i";
done; done;
...@@ -100,7 +100,7 @@ if [ "$Q" ]; then ...@@ -100,7 +100,7 @@ if [ "$Q" ]; then
else else
mkfontdir mkfontdir
fi; fi;
rmdir $TMPDIR; rmdir "$TMPDIR"
if [ "$DISPLAY" ]; then $Q echo "adjusting X font database"; xset fp rehash; fi; if [ "$DISPLAY" ]; then $Q echo "adjusting X font database"; xset fp rehash; fi;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment