Re: Management of opendocument (openoffice.org) files in git
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Sep 16, 2008, 07:09 UTC
- Message-ID
- <48CF5B90.5050800@viscovery.net>
- In-Reply-To
- <loom.20080915T222909-709@post.gmane.org>
Sergio Callegari schrieb:
Show 21 quoted lines
> if [ $# = 0 ] ; then > tmpcopy=$(mktemp rezip.zip.XXXXXX) > cat > $tmpcopy > filename="$tmpcopy" > else > tmpcopy="" > filename="$1" > fi > > workdir=$(mktemp -d -t rezip.workdir.XXXXXX) > curdir=$(pwd) > > cd $workdir > unzip $UNZIP_OPTS "$curdir/$filename" > zip $ZIP_OPTS "$curdir/$filename" . > cd $curdir > rm -fr $workdir > if [ ! -z "$tmpcopy" ] ; then > cat $filename > rm $tmpcopy > fi
You don't need a temporay zip filename in filter mode:
unzip $UNZIP_OPTS /dev/stdin # works for me, but not 100% portable zip $ZIP_OPTS - . # writes to stdout
Show 5 quoted lines
> then put in your .git/config something like > > [filter "opendocument"] > clean = "rezip -p ODF_UNCOMPRESS" > smudge = "rezip -p ODF_COMPRESS"
Is the smudge filter really necessary? Can't OOo work with files at compression level 0?
-- Hannes