summaryrefslogtreecommitdiffstats
path: root/bin/gen-gfm-release-table.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
commitc484829272cd13a738e35412498e12f2c9a194ac (patch)
treea1f5ec09629ee895bd3963fa8820b45f2f4c574b /bin/gen-gfm-release-table.sh
parentInitial commit. (diff)
downloadliborcus-c484829272cd13a738e35412498e12f2c9a194ac.tar.xz
liborcus-c484829272cd13a738e35412498e12f2c9a194ac.zip
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/gen-gfm-release-table.sh')
-rwxr-xr-xbin/gen-gfm-release-table.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/gen-gfm-release-table.sh b/bin/gen-gfm-release-table.sh
new file mode 100755
index 0000000..306c9a9
--- /dev/null
+++ b/bin/gen-gfm-release-table.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+PROJ_PREFIX=orcus
+PKG_PREFIX=lib$PROJ_PREFIX
+
+# Pick up the version number string from configure.ac.
+VER_MAJOR=$(cat ./configure.ac | grep -E $PROJ_PREFIX"_major_version.*[0-9]" | sed -e "s/.*\[\([0-9][0-9]*\).*/\1/g")
+VER_MINOR=$(cat ./configure.ac | grep -E $PROJ_PREFIX"_minor_version.*[0-9]" | sed -e "s/.*\[\([0-9][0-9]*\).*/\1/g")
+VER_MICRO=$(cat ./configure.ac | grep -E $PROJ_PREFIX"_micro_version.*[0-9]" | sed -e "s/.*\[\([0-9][0-9]*\).*/\1/g")
+VER="$VER_MAJOR.$VER_MINOR.$VER_MICRO"
+
+PKGS=$(ls $PKG_PREFIX-$VER.tar.*)
+
+echo "## Release Notes"
+echo ""
+echo "* add item"
+echo ""
+echo "## Source packages for distribution"
+echo ""
+
+echo "| URL | sha256sum | size |"
+echo "|-----|-----------|------|"
+
+for _PKG in $PKGS; do
+ _URL="[$_PKG](https://kohei.us/files/$PROJ_PREFIX/src/$_PKG)"
+ _HASH=$(sha256sum $_PKG | sed -e "s/^\(.*\)$PKG_PREFIX.*/\1/g" | tr -d "[:space:]")
+ _SIZE=$(stat -c "%s" $_PKG)
+ echo "| $_URL | $_HASH | $_SIZE |"
+done
+