Add very simple debugging script

this script converts include statements to dump the included file's
contents inline.
This commit is contained in:
AD7six 2014-10-24 09:00:36 +00:00
parent 8dc4706e1e
commit e883e7d8c5
1 changed files with 25 additions and 0 deletions

25
bin/inline.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
function dump {
echo "### $1 START"
while read line
do
if [[ $line =~ "#" ]];
then
# skip comments
continue
elif [[ $line =~ "^ *$" ]];
then
# skip blank lines
continue
elif [[ $line =~ ^(\s*)include\s*(.*)\; ]];
then
dump ${BASH_REMATCH[2]}
else
echo "$line"
fi
done < $1
echo "### $1 END"
}
dump $1