mirror of
https://github.com/AuxXxilium/arc-modules.git
synced 2024-12-03 21:26:53 +07:00
7c25ad92ff
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
30 lines
955 B
Bash
Executable File
30 lines
955 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
root=$(pwd)
|
|
start=${root}/thirdparty
|
|
rm -f ${start}/modules.yml
|
|
touch ${start}/modules.yml
|
|
echo "## List of included modules" >>${start}/modules.yml
|
|
for folder in ${start}/*; do
|
|
if test -d ${folder}; then
|
|
echo "${folder}"
|
|
echo "" >> ${start}/modules.yml
|
|
path=$(echo ${folder} | rev | cut -d '/' -f-1 | rev)
|
|
echo "### ${path}" >>${start}/modules.yml
|
|
echo "" >>${start}/modules.yml
|
|
# Get list of all modules
|
|
for F in $(ls ${folder}/*.ko); do
|
|
X=$(basename ${F})
|
|
M=$(basename ${F} | sed 's/\.[^.]*$//')
|
|
DESC=$(modinfo ${F} | awk -F':' '/description:/{ print $2}' | awk '{sub(/^[ ]+/,""); print}')
|
|
[ -z "${DESC}" ] && DESC="${X}"
|
|
echo "${M} \"${DESC}\""
|
|
echo "* ${M} \"${DESC}\"" >>${start}/modules.yml
|
|
done
|
|
fi
|
|
done
|
|
echo "" >> ${start}/modules.yml
|
|
date=$(date +'%y.%m.%d')
|
|
echo "Update: ${date}" >>${start}/modules.yml
|
|
|
|
mv -f ${start}/modules.yml ${root}/modules.yml |