summaryrefslogtreecommitdiff
path: root/roles/cgit/files/cgit.source.filter
blob: f5c8e887ed7b798d55dba19e84291c4d8eb6ba4b (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# store filename and extension in local vars
BASENAME="$1"
EXTENSION="${BASENAME##*.}"

# map Makefile and Makefile.* to .mk
[ "${BASENAME%%.*}" = "Makefile" ] && EXTENSION=mk

exec highlight --force -f -S "$EXTENSION" 2>/tmp/cgit.filter