Skip to content

Commit

Permalink
Update and rename changelog_info_retriever to changelog_parser.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar authored Oct 16, 2020
1 parent 45a9a95 commit 7f7369b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 0 additions & 24 deletions changelog_info_retriever

This file was deleted.

24 changes: 24 additions & 0 deletions changelog_parser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

function parse() {
version="$1"

while IFS= read -r line && [ -z "`echo "$line" | grep -e "^#\+ $version"`" ]
do
: # do nothing
done

while IFS= read -r line && [ -z "`echo "$line" | grep -e "^#\+"`" ]
do
echo "$line"
done
}

version="$1"
file="$2"

if [ -n "$file" ]; then
parse "$version" < "$file"
else
parse "$version"
fi

0 comments on commit 7f7369b

Please sign in to comment.