23 lines
509 B
Plaintext
23 lines
509 B
Plaintext
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
exec 3< <(egrep -o "class\sNUT_EXPORT\s(\S+)" ../src -R 2>&1)
|
||
|
|
|
||
|
|
pattern="\.\.\/src\/([a-z]+)\.h\:class\sNUT_EXPORT\s(\w+)"
|
||
|
|
|
||
|
|
echo "" > "Nut"
|
||
|
|
echo "" > "nut.h"
|
||
|
|
|
||
|
|
while read line; do
|
||
|
|
if [[ $line =~ $pattern ]]; then
|
||
|
|
header=${BASH_REMATCH[1]}
|
||
|
|
class=${BASH_REMATCH[2]}
|
||
|
|
|
||
|
|
echo "#include \"../src/$header.h\"" > $class
|
||
|
|
echo "#include \"../src/$header.h\"" > "$header.h"
|
||
|
|
|
||
|
|
echo "#include \"../src/$header.h\"" >> "Nut"
|
||
|
|
echo "#include \"../src/$header.h\"" >> "nut.h"
|
||
|
|
fi
|
||
|
|
done <&3
|
||
|
|
exec 3<&-
|