summaryrefslogtreecommitdiffstats
path: root/data/presets/regenerate-presets
blob: ff33a00d4b18d900b9441627417f5399bd410ec2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#
# regenerate-presets
#
# Copyright (c) 2006  D. Michael McIntyre <rosegarden.trumpeter@gmail.com>
# Released under the GPL
#
# REQUIRES: ../scripts/preset-xmlify ../scripts/dehumanize
#
#
# PURPOSE: to run the above scripts without a lot of bothersome typing
#
#
#

rm -f presets*.xml

for x in presets-editable*.conf; do
    xmlfile=presets`echo $x | sed 's/^presets-editable\(.*\)\.conf$/\1/'`.xml
    ../../scripts/preset-xmlify < "$x" > "$xmlfile" && \
    ../../scripts/dehumanize "$xmlfile" || \
    echo "Something went wrong.  $xmlfile is probably mangled."
    chmod -w "$xmlfile"
    echo $xmlfile updated successfully
done