commit 7dc8ccb59d3001a2174575a4444adbdcb30608e0
parent 04081a7fe210cd42eb9a865b28cbd8a52d4af16d
Author: krasjet <nil@krj.st>
Date: Mon, 13 Jul 2020 06:26:45 -0700
add recompile all as command
Diffstat:
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
@@ -65,15 +65,16 @@ usage: grm <command> [<args>]
Git repo manager, manage git repositories on self-hosted git servers.
commands:
- new create a new repository
+ new create a new repo
info repo_name display metadata of the repo
- ls list all repositories
- ls public list public repositories
- ls private list private repositories
- rm repo1 [repo2..] remove repositories
+ ls list all repos
+ ls public list public repos
+ ls private list private repos
+ rm repo1 [repo2..] remove repos
rc recompile stagit index
- rc repo1 [repo2..] recompile stagit pages for repositories,
+ rc repo1 [repo2..] recompile stagit pages for repos,
and recompile index
+ rca recompile all public repos
help show help
```
diff --git a/grm b/grm
@@ -170,6 +170,10 @@ grm_recompile() {
echo "recompilation done!"
}
+grm_recompileall() {
+ grm_list public | xargs "$0" rc
+}
+
grm_info() {
[ -z "$1" ] && { echo "no repo name given, exiting..."; exit 1; }
@@ -212,19 +216,17 @@ or
$ sudo -u git -- $prog_name <command> [<args>]
commands:
- new create a new repository
+ new create a new repo
info repo_name display metadata of the repo
- ls list all repositories
- ls public list public repositories
- ls private list private repositories
- rm repo1 [repo2..] remove repositories
+ ls list all repos
+ ls public list public repos
+ ls private list private repos
+ rm repo1 [repo2..] remove repos
rc recompile stagit index
- rc repo1 [repo2..] recompile stagit pages for repositories,
+ rc repo1 [repo2..] recompile stagit pages for repos,
and recompile index
+ rca recompile all public repos
help show help
-
-To recompile stagit pages for all repositories,
- $ $prog_name ls | xargs $prog_name rc
EOF
}
@@ -234,6 +236,7 @@ case "$1" in
ls|list) cmd=list;;
rm|remove) cmd=remove;;
rc|recompile) cmd=recompile;;
+ rca|recompileall) cmd=recompileall;;
info) cmd=info;;
*) { show_help; exit; };;
esac