-
Notifications
You must be signed in to change notification settings - Fork 1
/
get-plugin-modules.sh
executable file
·40 lines (34 loc) · 1.01 KB
/
get-plugin-modules.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
PWD=`pwd`
cd src/dlbc/plugins
echo "// Written in the D programming language."
echo
echo "/**"
echo " List of plugin modules that have parameters to be registered."
echo " This file has been automatically generated by \$(D $0)."
echo
echo " Copyright: Stefan Frijters 2011-2015"
echo
echo " License: \$(HTTP www.gnu.org/licenses/gpl-3.0.txt, GNU General Public License, version 3 (GPL-3.0))."
echo
echo " Authors: Stefan Frijters"
echo "*/"
echo
echo "module dlbc.plugins.plist;"
echo
echo "import std.typetuple; // For TypeTuple / AliasSeq - keep for now for backwards compatibility"
echo
echo "alias parameterSourcePluginModules = TypeTuple!("
for f in `find . -name "*.d" | sort`; do
# Ignore ./plist.d, as we want to write to this.
if [[ "$f" != "./plist.d" ]]; then
grep -e '^@("param")' --quiet $f
NOT_FOUND=$?
if [[ "$NOT_FOUND" -eq 0 ]]; then
MNAME=`echo $f | sed -e 's/^\.\//dlbc.plugins./' -e 's/\.d$//' -e 's/\//./'`
echo " \"$MNAME\","
fi
fi
done
echo ");"
cd $PWD