aboutsummaryrefslogtreecommitdiffstats
path: root/gitweb/generate-gitweb-js.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 14:24:48 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-07 07:52:11 +0900
commit19d8fe7da650970e5c18681f98d258fd924ecf9b (patch)
tree1c8099f4010092f3e18205cf2312a77041c8f9cd /gitweb/generate-gitweb-js.sh
parentMakefile: extract script to generate gitweb.cgi (diff)
downloadgit-19d8fe7da650970e5c18681f98d258fd924ecf9b.tar.gz
git-19d8fe7da650970e5c18681f98d258fd924ecf9b.zip
Makefile: extract script to generate gitweb.js
Similar to the preceding commit, also extract the script to generate the "gitweb.js" file. While the logic itself is trivial, it helps us avoid duplication of logic across build systems and ensures that the build systems will remain in sync with each other in case the logic ever needs to change. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/generate-gitweb-js.sh')
-rwxr-xr-xgitweb/generate-gitweb-js.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/gitweb/generate-gitweb-js.sh b/gitweb/generate-gitweb-js.sh
new file mode 100755
index 0000000000..01bb22b04b
--- /dev/null
+++ b/gitweb/generate-gitweb-js.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if test "$#" -lt 2
+then
+ echo >&2 "USAGE: $0 <OUTPUT> <INPUT>..."
+ exit 1
+fi
+
+OUTPUT="$1"
+shift
+
+cat "$@" >"$OUTPUT"