diff options
Diffstat (limited to 'scripts/gconf')
-rw-r--r-- | scripts/gconf/identity_modulo_mtime.xsl | 13 | ||||
-rwxr-xr-x | scripts/gconf/mtime_strip.sh | 10 |
2 files changed, 23 insertions, 0 deletions
diff --git a/scripts/gconf/identity_modulo_mtime.xsl b/scripts/gconf/identity_modulo_mtime.xsl new file mode 100644 index 0000000..06a49c7 --- /dev/null +++ b/scripts/gconf/identity_modulo_mtime.xsl @@ -0,0 +1,13 @@ +<!-- + shamelessly copied from + http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT + --> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + <xsl:template match="@mtime"/> +</xsl:stylesheet> diff --git a/scripts/gconf/mtime_strip.sh b/scripts/gconf/mtime_strip.sh new file mode 100755 index 0000000..7a9a336 --- /dev/null +++ b/scripts/gconf/mtime_strip.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +STARTDIR=. +if [ $# -ge 1 ]; then + STARTDIR="$1" +fi + +find "${STARTDIR}" -name '*.xml' -and -not -empty -print0 \ + | xargs -0 -I "{}" \ + sh -c 'mv "{}" "{}.orig"; xsltproc identity_modulo_mtime.xsl "{}.orig" > "{}"; rm -- "{}.orig"' |