openbsd-ports/x11/xscreensaver/files/migrate-xscreensaver-config.sh
ajacoutot 64f3b1b8a8 - split xscreensaver into 3 subpackages:
* -main for the main xscreensaver binaries
* -data for the savers than can be shared by other screensavers (like
the soon-to-be-imported gnome-screensaver)
* -gle which is a migration of the no-no_gle FLAVOR
- create .desktop files from xscreensaver xml files for use by
freedesktop compliant screensavers (scripts from gnome-screensaver)
- take maintainership
- resolve old conflict with games/circuit

inputs from jasper@, naddy@ and sthen@
ok sthen@ jasper@
2008-11-29 11:29:07 +00:00

39 lines
761 B
Bash
Executable File

#!/bin/sh
#
# $OpenBSD: migrate-xscreensaver-config.sh,v 1.1 2008/11/29 11:29:07 ajacoutot Exp $
#
# script originally from gnome-screensavers sources
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