From d2222f686813b8990b34ff040efb99eb5eb2b78a Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 1 Apr 2021 17:48:10 +0200 Subject: [PATCH] sh: Format the git table in a single attribute set --- garlic/sh/garlic-git-table | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/garlic/sh/garlic-git-table b/garlic/sh/garlic-git-table index 8d33e7b..58f4049 100755 --- a/garlic/sh/garlic-git-table +++ b/garlic/sh/garlic-git-table @@ -15,11 +15,13 @@ EOF exit 1 fi -echo 'gitTable = {' -echo " # Auto-generated with $progname on $(date --rfc-3339=date)" +echo '{' +echo " # Auto-generated with $progname on $(date --rfc-3339=date) for repo:" +echo " # $1" +echo git ls-remote $1 'garlic/*' |\ sed 's@refs/heads/@@' |\ awk '{printf "\"%s\" = \"%s\";\n", $2, $1}' |\ column -t -o ' ' |\ sed 's/^/ /' -echo '};' +echo '}'