[Libreoffice-commits] .: solenv/bin

Caolán McNamara caolan at kemper.freedesktop.org
Sun Jan 9 08:52:51 PST 2011


 solenv/bin/striplanguagetags.sh |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 3f8d6a3c78d0a5380ca0748b3e2a16986cbd2240
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jan 9 16:52:25 2011 +0000

    set a template for mktemp, apparently required in macosx

diff --git a/solenv/bin/striplanguagetags.sh b/solenv/bin/striplanguagetags.sh
index 95aa3a7..46d88e0 100755
--- a/solenv/bin/striplanguagetags.sh
+++ b/solenv/bin/striplanguagetags.sh
@@ -6,7 +6,17 @@
 
 #All a bit hacky, but it should work
 
-XSL=`mktemp`
+tempfoo=`basename $0`
+XSL=`mktemp /tmp/${tempfoo}.XXXXXX`
+if [ $? -ne 0 ]; then
+    echo "$0: Can't create temp file, exiting..."
+    exit 1
+fi
+WRKDIR=`mktemp -d /tmp/${tempfoo}.XXXXXX`
+if [ $? -ne 0 ]; then
+    echo "$0: Can't create temp dir, exiting..."
+    exit 1
+fi
 
 cat > $XSL << EOF
 <?xml version="1.0" encoding="UTF-8"?>
@@ -24,7 +34,6 @@ cat > $XSL << EOF
 </xsl:stylesheet>
 EOF
 
-WRKDIR=`mktemp -d`
 unzip -q $1 -d $WRKDIR
 pushd $WRKDIR
 for a in *; do


More information about the Libreoffice-commits mailing list