[download]
local/bin/lexguy
1
2
3
4
5
6
7
8
9 f=~/.cache/lexguy && rm -f $f
10
11 file=${1##*/}
12 name=${PWD##*/}
13
14 case ${file##*.} in
15 svg) perm='Creative Commons BY-SA License';;
16 *) perm='GNU Lesser General Public License';;
17 esac
18
19 case ${file##*.} in
20 lua) comm='--';;
21 css) comm=' *';;
22 html) comm=' !';;
23 xml) comm=' !';;
24 svg) comm=' !';;
25 c) comm='//';;
26 h) comm='//';;
27 php) comm='//';;
28 js) comm='//';;
29 *) comm='#';;
30 esac
31
32
33 >> $f echo " ▓███████"
34 >> $f echo " ▓███████ $name: ${file^}"
35 >> $f echo " ▓███████ > $perm"
36 >> $f echo "▓█████████████"; git log --date=format:%Y \
37 --format=" ▓███████ © %cd %an <%ae>" "$1" | uniq >> $f
38 >> $f echo " ▓██ ▓██"
39
40 sed "s:^:$(printf '%-2s' "$comm") :" $f
|