aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2019-10-29 12:31:55 +0200
committerBenjamin Copeland <ben.copeland@linaro.org>2020-05-27 12:09:15 +0100
commit27dde9173f5ff9dcec8f82e9da75b32c43bc7aad (patch)
tree6f38fa4e2bf453c04b8345d84025dcc80a5074e6
parent47f39585b74bbae445a3702e9b0b7e9525d54e8c (diff)
Cgit: debian building changeslinaro-patches
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-rw-r--r--Makefile4
-rw-r--r--cgit.css17
-rwxr-xr-xfilters/html-converters/rst2html2
-rwxr-xr-xfilters/syntax-highlighting.py5
-rwxr-xr-xfilters/syntax-highlighting.sh4
5 files changed, 26 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 49109ad..bd4e5b5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,11 @@ all::
CGIT_VERSION = v1.2.3
CGIT_SCRIPT_NAME = cgit.cgi
-CGIT_SCRIPT_PATH = /var/www/htdocs/cgit
+CGIT_SCRIPT_PATH = /usr/share/cgit
CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
CGIT_CONFIG = /etc/cgitrc
CACHE_ROOT = /var/cache/cgit
-prefix = /usr/local
+prefix = /usr
libdir = $(prefix)/lib
filterdir = $(libdir)/cgit/filters
docdir = $(prefix)/share/doc/cgit
diff --git a/cgit.css b/cgit.css
index d4aadbf..6be986e 100644
--- a/cgit.css
+++ b/cgit.css
@@ -893,3 +893,20 @@ div#cgit table.ssdiff td.space {
div#cgit table.ssdiff td.space div {
min-height: 3em;
}
+
+/* Style definition file generated by highlight 3.9, http://www.andre-simon.de/ */
+/* Highlighting theme: Kwrite Editor */
+/* adapted for cgit */
+div#cgit table.blob .num { color:#b07e00; }
+div#cgit table.blob .esc { color:#ff00ff; }
+div#cgit table.blob .str { color:#bf0303; }
+div#cgit table.blob .pps { color:#818100; }
+div#cgit table.blob .slc { color:#838183; font-style:italic; }
+div#cgit table.blob .com { color:#838183; font-style:italic; }
+div#cgit table.blob .ppc { color:#008200; }
+div#cgit table.blob .opt { color:#000000; }
+div#cgit table.blob .lin { color:#555555; }
+div#cgit table.blob .kwa { color:#000000; font-weight:bold; }
+div#cgit table.blob .kwb { color:#0057ae; }
+div#cgit table.blob .kwc { color:#000000; font-weight:bold; }
+div#cgit table.blob .kwd { color:#010181; }
diff --git a/filters/html-converters/rst2html b/filters/html-converters/rst2html
index 02d90f8..055aec3 100755
--- a/filters/html-converters/rst2html
+++ b/filters/html-converters/rst2html
@@ -1,2 +1,2 @@
#!/bin/bash
-exec rst2html.py --template <(echo -e "%(stylesheet)s\n%(body_pre_docinfo)s\n%(docinfo)s\n%(body)s")
+exec rst2html --template <(echo -e "%(stylesheet)s\n%(body_pre_docinfo)s\n%(docinfo)s\n%(body)s")
diff --git a/filters/syntax-highlighting.py b/filters/syntax-highlighting.py
index e912594..f44322f 100755
--- a/filters/syntax-highlighting.py
+++ b/filters/syntax-highlighting.py
@@ -41,7 +41,10 @@ try:
except ClassNotFound:
# check if there is any shebang
if data[0:2] == '#!':
- lexer = guess_lexer(data)
+ try:
+ lexer = guess_lexer(data)
+ except ClassNotFound:
+ lexer = TextLexer()
else:
lexer = TextLexer()
except TypeError:
diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh
index 840bc34..5033f58 100755
--- a/filters/syntax-highlighting.sh
+++ b/filters/syntax-highlighting.sh
@@ -115,7 +115,7 @@ EXTENSION="${BASENAME##*.}"
# found (for example) on EPEL 6.
#
# This is for version 2
-exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
+#exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
# This is for version 3
-#exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null
+exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null