From 2aca5fb2177c9d004504c2578943011bf05de0d2 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 23 Aug 2020 16:08:30 -0400 Subject: Add versions script --- home/.local/bin/versions | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 home/.local/bin/versions (limited to 'home') diff --git a/home/.local/bin/versions b/home/.local/bin/versions new file mode 100755 index 00000000..25e5ff72 --- /dev/null +++ b/home/.local/bin/versions @@ -0,0 +1,9 @@ +#!/bin/sh +set -u + +for repo in ~/src/git/*; do + version=$(git -C "${repo}" describe --dirty 2>/dev/null) + if [ $? -eq 0 ]; then + echo "${repo##*/}-${version#v}" + fi +done | sort -nr -t '-' -k 3 | column -t -s '-' -- cgit 1.4.1