MicroUtils/changelog_info_retriever

25 lines
373 B
Plaintext
Raw Normal View History

2020-10-02 14:45:16 +00:00
#!/bin/bash
function parse() {
2020-10-03 09:46:18 +00:00
version=$1
2020-10-02 14:45:16 +00:00
2020-10-03 09:46:18 +00:00
while IFS= read -r line && [ -z "`echo $line | grep -e "^#\+ $version"`" ]
do
: # do nothing
done
2020-10-02 14:45:16 +00:00
2020-10-03 09:46:18 +00:00
while IFS= read -r line && [ -z "`echo $line | grep -e "^#\+"`" ]
do
echo "$line"
done
2020-10-02 14:45:16 +00:00
}
version=$1
file=$2
if [ -n "$file" ]; then
parse $version < "$file"
else
parse $version
fi