Added CHANGELOG.md and .extract_section.sh script (copied from FETK implementation)

This commit is contained in:
Noah Oblath
2021-12-01 12:03:28 -08:00
parent 98afe85a16
commit c87ec7735e
2 changed files with 78 additions and 0 deletions

49
.extract_section.sh Executable file
View File

@@ -0,0 +1,49 @@
#! /bin/bash
while getopts f:v: flag
do
case "${flag}" in
f) filename=${OPTARG};;
v) version=${OPTARG};;
esac
done
if [ -z "$filename" ]; then
echo "Please specify a filename using '-f'"
exit 1
fi
if [ ! -f $filename ]; then
echo "File does not exist: ${filename}"
exit 1
fi
if [ -z "$version" ]; then
echo "Please specify a version using '-v'"
exit 1
fi
#echo "Analyzing file $filename"
header="## ${version}"
#echo "Section title: <${header}>"
foundTitle=false
while read line; do
if [ "$foundTitle" == false ]; then
if [[ "$line" =~ ^${header} ]]; then
foundTitle=true
fi
else
if [[ $line = '## '* ]]; then
break
else
echo "$line"
fi
fi
done <$filename
if [ "$foundTitle" == false ]; then
echo "[No changes were documented]"
fi

29
CHANGELOG.md Normal file
View File

@@ -0,0 +1,29 @@
# APBS Changelog
## 3.3.0.alpha
Dec 10, 2021
* An amazing update
* Another amazing update
* A stupendous update
## 3.2.1
Sep 16, 2021
## 3.0.0
May 29, 2020
## 1.5.0
Oct 17, 2016
## 1.4.2.1
Jan 15, 2016
## 1.4.2
Jan 6, 2015