From 4b1a6ef78bd9857e915d2c1600fbbc89ebeb1b1e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 17 Jun 2021 01:45:01 -0300 Subject: scripts/paku: Generate paku.html --- scripts/paku | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/paku b/scripts/paku index 3c9e793..939db80 100755 --- a/scripts/paku +++ b/scripts/paku @@ -232,12 +232,123 @@ refresh_packages() { else NEW_VERSION="$(git describe --tags --abbrev=0 | cut -c2-)" fi + DESCRIPTION="$(cat description)" cd - >/dev/null jq -r ".packages[$N].version = \"$NEW_VERSION\"" paku.json | sponge paku.json + jq -r ".packages[$N].description = \"$DESCRIPTION\"" paku.json | sponge paku.json done } -while getopts 'gr' flag; do +report_index() { + cat < paku.html + + + + + + + Package index + + + + +

+ Package index +

+ + + +EOF +} + +while getopts 'grl' flag; do case "$flag" in g) gen_guix @@ -247,6 +358,9 @@ while getopts 'gr' flag; do r) refresh_packages ;; + l) + report_index + ;; *) printf 'Unrecognized flag "%s".\n' "$flag" >&2 ;; -- cgit v1.2.3