diff options
author | Perberos <[email protected]> | 2011-11-04 22:16:15 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2011-11-04 22:16:15 -0300 |
commit | fff4ecc82f2bcfa7427596e7ad9c3769fcab040b (patch) | |
tree | ac4f1812a7991609c9c32c776daede2d8492f7b5 /data/migrate-xscreensaver-config.sh | |
download | mate-screensaver-fff4ecc82f2bcfa7427596e7ad9c3769fcab040b.tar.bz2 mate-screensaver-fff4ecc82f2bcfa7427596e7ad9c3769fcab040b.tar.xz |
first commit
Diffstat (limited to 'data/migrate-xscreensaver-config.sh')
-rwxr-xr-x | data/migrate-xscreensaver-config.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/data/migrate-xscreensaver-config.sh b/data/migrate-xscreensaver-config.sh new file mode 100755 index 0000000..860a0d5 --- /dev/null +++ b/data/migrate-xscreensaver-config.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +DIST_BIN=`dirname "$0"` + +CMD=xsltproc +XSL=${DIST_BIN}/xscreensaver-config.xsl + +if test "x$1" = "x" -o "x$1" = "x-h" -o "x$1" = "x--help"; then + echo "usage: $0 [file] ..." + exit 1 +fi + +if [ ! -r ${XSL} ]; then + echo "Cannot find XSLT file" + exit 1 +fi + +FILES="$@" +for FILE in $FILES; do + echo "${FILE}" | grep ".xml$" > /dev/null + if [ $? -ne 0 ]; then + echo "Skipping non-xml file: ${FILE}" + continue + fi + + d=`dirname ${FILE}` + b=`basename ${FILE} .xml` + + outfile="${b}.desktop" + echo "Creating: ${outfile}" + ${CMD} -o ${outfile} ${XSL} ${FILE} +done + + exit 0 |