diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-10-10 03:54:40 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-10-10 03:54:40 -0400 |
| commit | 6abac20d38e021279a88f412b78431369300dc62 (patch) | |
| tree | 4338cc99e58e484332d89e908e0f5f3de56a2a1e /ck. | |
| parent | 12d44ae5d93ba1ad604c4f30e3db861b6b2b9260 (diff) | |
| download | ck4up-config-6abac20d38e021279a88f412b78431369300dc62.tar.gz | |
Add gitlab.conf, lists of unchecked builds (*.txt), ck and ck. scripts.
Diffstat (limited to 'ck.')
| -rwxr-xr-x | ck. | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -0,0 +1,42 @@ +#!/bin/sh + +colorize_ver() { + color="${1:-3}" + perl -pe 's,(\d[\d.]+),\x1b[1;3'$color'm$1\x1b[0m,x' +} + +sort_color() { + sort -V | colorize_ver +} + +last_gh_commit() { + # only show latest commit + head -1 | sed 's,.*::Commit/\([^<]*\)</id>,\1,' +} + +last_gh_tag() { + # only show latest commit + head -1 | sed 's,.*/v*\([^/]*\)</id.*,\1,' +} + +DIR=~/.ck4up +build="$( basename $( pwd ) )" +conf="$( grep -l "^$build " $DIR/*.conf )" + +case "$conf" in + "") echo "can't find $build in $DIR/*.conf" 2>&1 ; exit 0 ;; + *" "*) echo "$build is in multiple configs: $conf" 2>&1; exit 0;; + *) ;; +esac + +if grep -q "^$build .*github.*commits.atom" $conf; then + postproc="last_gh_commit" +elif grep -q "^$build .*github.*tags.atom" $conf ; then + postproc="last_gh_tag" +else + postproc="sort_color" +fi + +ck4up -dk -f "$conf" "^$build\\s" | $postproc +source ./*.info +echo "===> VERSION=$VERSION" | colorize_ver 2 |
