mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-25 09:41:47 +08:00
Merge pull request #123 from fennecJ/patch
Generate contributor list as a modular inclusion
This commit is contained in:
commit
d88d0cd227
8
.mailmap
Normal file
8
.mailmap
Normal file
|
@ -0,0 +1,8 @@
|
|||
JianXing Wu <fdgkhdkgh@gmail.com> 吳建興 <fdgkhdkgh@gmail.com>
|
||||
fennecJ <hwahwa649@gmail.com> fennecJ <58484289+fennecJ@users.noreply.github.com>
|
||||
fennecJ <hwahwa649@gmail.com> fennecj <hwahwa649@gmail.com>
|
||||
Jim Huang <jserv.tw@gmail.com> Jim Huang <jserv@ccns.ncku.edu.tw>
|
||||
Jim Huang <jserv.tw@gmail.com> Jim Huang <jserv@biilabs.io>
|
||||
linD026 <shiyn.lin@gmail.com> linD026 <66012716+linD026@users.noreply.github.com>
|
||||
linD026 <shiyn.lin@gmail.com> linD026 <0086d026@email.ntou.edu.tw>
|
||||
linD026 <shiyn.lin@gmail.com> linzhien <0086d026@email.ntou.edu.tw>
|
33
contrib.tex
Normal file
33
contrib.tex
Normal file
|
@ -0,0 +1,33 @@
|
|||
2011eric, % <20110901eric@outlook.com>
|
||||
25077667, % <zxc25077667@gmail.com>
|
||||
Arush Sharma, % <46960231+arushsharma24@users.noreply.github.com>
|
||||
asas1asas200, % <asas1asas200@gmail.com>
|
||||
Benno Bielmeier, % <32938211+bbenno@users.noreply.github.com>
|
||||
Brad Baker, % <brad@brdbkr.com>
|
||||
ccs100203, % <ccs100203@gmail.com>
|
||||
Chih-Yu Chen, % <34228283+chihyu1206@users.noreply.github.com>
|
||||
ChinYikMing, % <yikming2222@gmail.com>
|
||||
Cyril Brulebois, % <cyril@debamax.com>
|
||||
Daniele Paolo Scarpazza, % <>
|
||||
David Porter, % <>
|
||||
demonsome, % <horseradish1208@gmail.com>
|
||||
Dimo Velev, % <>
|
||||
Ekang Monyet, % <ekangmonyet@posteo.net>
|
||||
fennecJ, % <hwahwa649@gmail.com>
|
||||
Francois Audeon, % <>
|
||||
gagachang, % <vivahavey@gmail.com>
|
||||
Gilad Reti, % <gilad.reti@gmail.com>
|
||||
Horst Schirmeier, % <>
|
||||
Hsin-Hsiang Peng, % <hsinspeng@gmail.com>
|
||||
Ignacio Martin, % <>
|
||||
JianXing Wu, % <fdgkhdkgh@gmail.com>
|
||||
linD026, % <shiyn.lin@gmail.com>
|
||||
Marconi Jiang, % <marconi1964@yahoo.com>
|
||||
RinHizakura, % <s921975628@gmail.com>
|
||||
Roman Lakeev, % <>
|
||||
Stacy Prowell, % <sprowell@gmail.com>
|
||||
Tucker Polomik, % <tucker.polomik@inficon.com>
|
||||
VxTeemo, % <tcccvvv123@gmail.com>
|
||||
Wei-Lun Tsai, % <alan23273850@gmail.com>
|
||||
xatier, % <xatierlike@gmail.com>
|
||||
Ylowy. % <69316865+YLowy@users.noreply.github.com>
|
|
@ -82,7 +82,11 @@ Jim Huang upgraded to recent kernel versions (v5.x) and revised the \LaTeX\ docu
|
|||
\subsection{Acknowledgements}
|
||||
\label{sec:acknowledgements}
|
||||
|
||||
The following people have contributed corrections or good suggestions: Ignacio Martin, David Porter, Daniele Paolo Scarpazza, Dimo Velev, Francois Audeon, Horst Schirmeier, and Roman Lakeev.
|
||||
The following people have contributed corrections or good suggestions:
|
||||
|
||||
\begin{flushleft}
|
||||
\input{contrib}
|
||||
\end{flushleft}
|
||||
|
||||
\subsection{What Is A Kernel Module?}
|
||||
\label{sec:kernelmod}
|
||||
|
|
33
scripts/Contributors
Normal file
33
scripts/Contributors
Normal file
|
@ -0,0 +1,33 @@
|
|||
2011eric,<20110901eric@outlook.com>
|
||||
25077667,<zxc25077667@gmail.com>
|
||||
Arush Sharma,<46960231+arushsharma24@users.noreply.github.com>
|
||||
asas1asas200,<asas1asas200@gmail.com>
|
||||
Benno Bielmeier,<32938211+bbenno@users.noreply.github.com>
|
||||
Brad Baker,<brad@brdbkr.com>
|
||||
ccs100203,<ccs100203@gmail.com>
|
||||
Chih-Yu Chen,<34228283+chihyu1206@users.noreply.github.com>
|
||||
ChinYikMing,<yikming2222@gmail.com>
|
||||
Cyril Brulebois,<cyril@debamax.com>
|
||||
Daniele Paolo Scarpazza,<>
|
||||
David Porter,<>
|
||||
demonsome,<horseradish1208@gmail.com>
|
||||
Dimo Velev,<>
|
||||
Ekang Monyet,<ekangmonyet@posteo.net>
|
||||
fennecJ,<hwahwa649@gmail.com>,<58484289+fennecJ@users.noreply.github.com>
|
||||
Francois Audeon,<>
|
||||
gagachang,<vivahavey@gmail.com>
|
||||
Gilad Reti,<gilad.reti@gmail.com>
|
||||
Horst Schirmeier,<>
|
||||
Hsin-Hsiang Peng,<hsinspeng@gmail.com>
|
||||
Ignacio Martin,<>
|
||||
JianXing Wu,<fdgkhdkgh@gmail.com>
|
||||
linD026,<shiyn.lin@gmail.com>,<0086d026@email.ntou.edu.tw>,<66012716+linD026@users.noreply.github.com>
|
||||
Marconi Jiang,<marconi1964@yahoo.com>
|
||||
RinHizakura,<s921975628@gmail.com>
|
||||
Roman Lakeev,<>
|
||||
Stacy Prowell,<sprowell@gmail.com>
|
||||
Tucker Polomik,<tucker.polomik@inficon.com>
|
||||
VxTeemo,<tcccvvv123@gmail.com>
|
||||
Wei-Lun Tsai,<alan23273850@gmail.com>
|
||||
xatier,<xatierlike@gmail.com>
|
||||
Ylowy,<69316865+YLowy@users.noreply.github.com>
|
1
scripts/Exclude
Normal file
1
scripts/Exclude
Normal file
|
@ -0,0 +1 @@
|
|||
Jim Huang, One of main author
|
7
scripts/Include
Normal file
7
scripts/Include
Normal file
|
@ -0,0 +1,7 @@
|
|||
Daniele Paolo Scarpazza,<>
|
||||
David Porter,<>
|
||||
Dimo Velev,<>
|
||||
Francois Audeon,<>
|
||||
Horst Schirmeier,<>
|
||||
Ignacio Martin,<>
|
||||
Roman Lakeev,<>
|
60
scripts/list-contributors.sh
Executable file
60
scripts/list-contributors.sh
Executable file
|
@ -0,0 +1,60 @@
|
|||
#!/usr/bin/env bash
|
||||
FORMAT="%aN,<%aE>" #Set git output format in "Name,<Email>" //Capital in aN and aE means replace str based on .mailmap
|
||||
TARGET=(examples lkmpg.tex) #Target files we want to trace
|
||||
DIR=`git rev-parse --show-toplevel` #Get root dir of the repo
|
||||
TARGET=("${TARGET[@]/#/$DIR/}") #Concat $DIR BEFORE ALL elements in array TARGET
|
||||
|
||||
#The str in each line should be Username,<useremail>
|
||||
function gen-raw-list()
|
||||
{
|
||||
git log --pretty="$FORMAT" ${TARGET[@]} | sort -u
|
||||
}
|
||||
|
||||
function parse-list()
|
||||
{
|
||||
> Contributors # Clear contributors' list (Overwrite with null)
|
||||
while read -r line; do
|
||||
User=`echo "$line" | awk -F "," '{print $1}'`
|
||||
if [[ `grep -w "$User" Exclude` ]]; then
|
||||
echo "[skip] $User"
|
||||
continue;
|
||||
fi
|
||||
echo "[Add] $User"
|
||||
MainMail=`echo "$line" | awk -F "[<*>]" '{print $2}'`
|
||||
Emails=(`cat $DIR/.mailmap | grep -w "$User" | awk -F "[<*>]" '{print $4}' | sort -u`)
|
||||
for Email in ${Emails[@]}; do
|
||||
if [[ "$Email" != "$MainMail" ]]; then
|
||||
line="$line,<$Email>";
|
||||
fi
|
||||
done
|
||||
echo "$line" >> Contributors
|
||||
done <<< $(gen-raw-list)
|
||||
cat Include >> Contributors
|
||||
}
|
||||
|
||||
function sort-list()
|
||||
{
|
||||
if [[ `git diff Contributors` ]]; then
|
||||
sort -f -o Contributors{,}
|
||||
git add $DIR/scripts/Contributors
|
||||
fi
|
||||
}
|
||||
|
||||
#For all lines before endline, print "name, % <email>"
|
||||
#For endline print "name. % <email>"
|
||||
function gen-tex-file()
|
||||
{
|
||||
cat Contributors | awk -F "," \
|
||||
' BEGIN{k=0}{name[k]=$1;email[k++]=$2}
|
||||
END{
|
||||
for(i=0;i<k;i++){
|
||||
name[i]=(i<k-1)?name[i]",":name[i]".";
|
||||
printf("%-30s %% %s\n",name[i],email[i]);
|
||||
}
|
||||
}
|
||||
'
|
||||
}
|
||||
|
||||
parse-list
|
||||
sort-list
|
||||
gen-tex-file > $DIR/contrib.tex
|
Loading…
Reference in New Issue
Block a user