git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Management of opendocument (openoffice.org) files in git

From
Peter Krefting <peter@softwolves.pp.se>
Date
Sep 23, 2008, 11:08 UTC
Message-ID
<Pine.LNX.4.64.0809231202560.28506@ds9.cixit.se>
In-Reply-To
<loom.20080915T222909-709@post.gmane.org>
Sergio Callegari:
> To try it, save the following as "rezip" with execution permission:

I had some problems when I tried to implement this a Windows machine, it did not handle paths with spaces in them properly, and "Documents and Settings" does contain spaces.

The following patch fixes that for me:
---
 rezip |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/rezip b/rezip
index 15f83a4..845e875 100755
--- a/rezip
+++ b/rezip
@@ -66,7 +66,7 @@ done
 
 if [ $# = 0 ] ; then
     tmpcopy=$(mktemp rezip.zip.XXXXXX)
-    cat > $tmpcopy
+    cat > "$tmpcopy"
     filename="$tmpcopy"
 else
     tmpcopy=""
@@ -76,12 +76,12 @@ fi
 workdir=$(mktemp -d -t rezip.workdir.XXXXXX)
 curdir=$(pwd)
 
-cd $workdir
+cd "$workdir"
 unzip $UNZIP_OPTS "$curdir/$filename"
 zip $ZIP_OPTS "$curdir/$filename" .
-cd $curdir
-rm -fr $workdir
+cd "$curdir"
+rm -fr "$workdir"
 if [ ! -z "$tmpcopy" ] ; then
-  cat $filename
-  rm $tmpcopy
+  cat "$filename"
+  rm "$tmpcopy"
 fi
-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Robin Rosenberg
Message 10 of 10 in “Management of opendocument (openoffice.org) files in git”
  1. Sergio CallegariSep 15, 2008
  2. Matthieu MoySep 16, 2008
  3. Sergio CallegariSep 16, 2008
  4. Johannes SixtSep 16, 2008
  5. Sergio CallegariSep 16, 2008
  6. Johannes SixtSep 16, 2008
  7. Avery PennarunSep 16, 2008
  8. Stephen R. van den BergSep 16, 2008
  9. Robin RosenbergSep 16, 2008
  10. Peter KreftingSep 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.