diff options
author | 2025-01-05 13:51:01 +0100 | |
---|---|---|
committer | 2025-01-05 13:51:01 +0100 | |
commit | 52ef0a87f842275d183ea8a391df63ff2dd81bd4 (patch) | |
tree | f14fbc7d3e3eb2677948540ae742fa004c433618 /image | |
parent | 438c0e9a1de91783d7bb3de19d22b836420f62b5 (diff) | |
download | cgit-oci-52ef0a87f842275d183ea8a391df63ff2dd81bd4.tar.gz cgit-oci-52ef0a87f842275d183ea8a391df63ff2dd81bd4.tar.bz2 cgit-oci-52ef0a87f842275d183ea8a391df63ff2dd81bd4.tar.lz cgit-oci-52ef0a87f842275d183ea8a391df63ff2dd81bd4.zip |
fix: make theming work hopefully
Diffstat (limited to 'image')
-rwxr-xr-x | image/prepare-container.sh | 2 | ||||
-rw-r--r-- | image/syntax-highlighting.sh | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/image/prepare-container.sh b/image/prepare-container.sh index 66ccb2f..fabe6e2 100755 --- a/image/prepare-container.sh +++ b/image/prepare-container.sh @@ -14,6 +14,8 @@ ensureKeyAlgo ecdsa [[ -f /etc/sshd_config ]] && mv /etc/sshd_config /etc/ssh/sshd_config || [[ -f /etc/ssh/sshd_config ]] chmod -w /etc/ssh/sshd_config +echo "$HIGHLIGHT_THEME" > /.highlight-theme + # prepare run dir if ! [[ -d "/var/run/sshd" ]]; then mkdir -p /var/run/sshd diff --git a/image/syntax-highlighting.sh b/image/syntax-highlighting.sh index 0585f61..d119e22 100644 --- a/image/syntax-highlighting.sh +++ b/image/syntax-highlighting.sh @@ -118,6 +118,7 @@ EXTENSION="${BASENAME##*.}" #exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null # This is for version 3 +HIGHLIGHT_THEME="${HIGHLIGHT_THEME:-"$(cat /.highlight-theme)"}" THEMEOPT=() if [[ "$HIGHLIGHT_THEME" != "" ]]; then THEMEOPT+=("--style=$HIGHLIGHT_THEME"); fi exec highlight --force --inline-css "${THEMEOPT[@]}" -f -I -O xhtml -S "$EXTENSION" 2>/dev/null |