pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit d5b1892934b96e5591ede28baeca9bd60a2be56a
parent 756830ca9e8bb08949244b1ae3a7c28f1fc33906
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun, 28 Apr 2024 19:40:35 +0200

Add script to trigger all post-update hooks

Diffstat:
MREADME | 9++-------
Abin/git_post_push_all.sh | 18++++++++++++++++++
2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/README b/README @@ -11,6 +11,7 @@ Structure |- bin/ | |- git_create_repo.sh Creates A bare repository and HTML viewer | |- git_post_push.sh Used as post-push hook in repositories +| |- git_post_push_all.sh Trigger post-update hook in all repositories | |- git_set_clone_url.sh Sets necessary URL to clone via http(s) | |- git_update_index_html.sh Updates the repository overview HTML page | |- git_update_repo_html.sh Updates the respository HTML viewer pages @@ -20,12 +21,7 @@ Structure | |- favicon.png Favicon and Logo of the page | |- backicon.png Logo for the "back" button in repos | |- style.css CSS for the HTML viewer -| |- highlight-bright.min.css Bright theme for the code syntax highlighting -| |- highlight-dark.min.css Dark theme for the code syntax highlighting -| '- highlight.min.js Code syntax highlighter java script -| -|- templates/ -| '- highlight.tt HTML template injection for the syntax highlight +| '- index.css CSS for the file index viewer | |- 404.html 404 Page |- index.html Index-Page for the Main site, redirects to /pub/ @@ -46,7 +42,6 @@ injection calls additional CSS and javascript from the highlight.js project All associated assets (licensed under BSD-3-clause) are delivered within this repository and are only loaded when needed. - Setup ===== diff --git a/bin/git_post_push_all.sh b/bin/git_post_push_all.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh +# SPDX-License-Identifier: AGPL-3.0-or-later +# SPDX-FileCopyrightText: 2024 JayVii <jayvii[AT]posteo[DOT]de> + +# $1 - HTML Root + +# Error out if not all options are given +if [ -z "$1" ]; then + echo "Usage: +git_post_push_all.sh \\ + \"/var/www/git.example.git\" + " + exit 1; +fi + +find "${1}/pub" -maxdepth 1 -type d -name "*.git" -exec {}/hooks/post-update \; +find "${1}/priv" -maxdepth 1 -type d -name "*.git" -exec {}/hooks/post-update \; +