From 03818ff10e86fff336fa45e06739d530073e8f67 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Tue, 26 Sep 2023 12:49:50 +0200 Subject: [PATCH] streamline usage with git --- README.org | 18 +++++++++-------- gis | 58 ++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 27 deletions(-) diff --git a/README.org b/README.org index 6b155e0..43dab0f 100644 --- a/README.org +++ b/README.org @@ -10,17 +10,19 @@ It was inspired by [[https://wiki.ros.org/wstool][wstool]], [[https://github.com * Usage #+begin_example - Usage: gis [OPTIONS] [PATHS] ... + Usage: gis [COMMANDS] [OPTIONS] - Show a status summary of all Git repositories in PATHS. - The colon-seperated environment variable $GIS_PATH is used if no PATH is given. - If the variable isn't set, the current work directory is used. + Show a status summary of all Git repositories which are found recursively in + current work directory. If the colon-separated environment variable $GIS_PATH + is set, the declared directories will be used instead. + + COMMANDS + fetch Execute 'git fetch --prune --all' for all found repositories + pull Execute 'git pull' for all found repositories which are behind upstream OPTIONS - -f, --fetch Execute 'git fetch --prune --all' for all repositories in PATHS - -p, --pull Execute 'git pull' for all repositories which are behind upstream - in PATHS - -h, --help Show this help message and exit + -p, --path PATH Use PATH for searching Git repositories + -h, --help Show this help message and exit #+end_example * Installation diff --git a/gis b/gis index 7de0bd2..ead9d03 100755 --- a/gis +++ b/gis @@ -11,19 +11,26 @@ text_yellow=$'\e[33m' function print_usage { cat <