From: Peter Krefting <peter@softwolves.pp.se>
To: Sergio Callegari <sergio.callegari@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Management of opendocument (openoffice.org) files in git
Date: Tue, 23 Sep 2008 12:08:37 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0809231202560.28506@ds9.cixit.se> (raw)
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/
next prev parent reply other threads:[~2008-09-23 11:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 22:40 Management of opendocument (openoffice.org) files in git Sergio Callegari
2008-09-16 6:45 ` Matthieu Moy
2008-09-16 7:41 ` Sergio Callegari
2008-09-16 7:09 ` Johannes Sixt
2008-09-16 7:41 ` Sergio Callegari
2008-09-16 7:52 ` Johannes Sixt
2008-09-16 16:04 ` Avery Pennarun
2008-09-16 19:28 ` Stephen R. van den Berg
2008-09-16 21:13 ` Robin Rosenberg
2008-09-23 11:08 ` Peter Krefting [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-16 6:24 Paolo Bonzini
2008-09-16 7:05 ` Sergio Callegari
2008-09-16 8:12 ` Paolo Bonzini
2008-10-02 12:52 ` Michael J Gruber
2008-10-10 8:12 ` Peter Krefting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0809231202560.28506@ds9.cixit.se \
--to=peter@softwolves.pp.se \
--cc=git@vger.kernel.org \
--cc=sergio.callegari@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).