git3html

git clone https://orangeshoelaces.net/git/git3html.git

4d46264a1e3fb6052bba2e793128f3482108890a

Author: Vasilii Kolobkov on 01/14/2019

Committer: Vasilii Kolobkov on 01/14/2019

Display 'git clone ...' line in the header

Stats

git3html | 4 ++++
1 file changed, 4 insertions(+)

Patch

diff --git a/git3html b/git3html
index 3998966..b41bf01 100755
--- a/git3html
+++ b/git3html
@@ -107,6 +107,10 @@ header() (
 	<header>
 	END
 	printf '<h1>%s</h1>\n' "$(echo "$projname" | escape)"
+	if [ -n "$cloneurl" ]; then
+		printf '<pre><code>git clone %s</code></pre>\n' \
+			"$(echo "$cloneurl" | escape)"
+	fi
 	cat <<-END
 	<nav>
 	<ul>