From c2da2b01b45f8664985a199883ce56586d5207fa Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 8 Nov 2024 00:45:13 +0300 Subject: [PATCH] ... Signed-off-by: Alex A. Naanou --- bin/git-listall | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/git-listall b/bin/git-listall index 6bc9719..5ba83e2 100755 --- a/bin/git-listall +++ b/bin/git-listall @@ -1,5 +1,6 @@ #!/usr/bin/env bash + shopt -s globstar while true ; do @@ -20,7 +21,7 @@ while true ; do echo "or recursively:" echo " $ git listall -r > reposiotry.lst" echo - echo "If a repository list already exists it can be expanded via:" + echo "If a repository list already exists it can be updated via:" echo " $ git listall -r reposiotry.lst >> reposiotry.lst" echo echo "For info on list file format see:" @@ -41,6 +42,12 @@ while true ; do continue ;; + -u|--update) + REPOS_FILE=$2 + shift 2 + continue + ;; + -*|--*) echo "Error: unknown option: \"$1\"" >&2 exit @@ -73,6 +80,10 @@ else REPOS=(./*/.git/config) fi +if [ -e "$LIST" ] ; then + echo + echo "# $(date)" +fi # format and print unique lines... lines=() {