Automatic readme generation
This commit is contained in:
@@ -1,2 +1,8 @@
|
||||
# firmware-open
|
||||
|
||||
System76 Open Source Firmware
|
||||
|
||||
- [Applications](./apps/README.md)
|
||||
- [Libraries](./libs/README.md)
|
||||
- [Models](./models/README.md)
|
||||
- [Tools](./tools/README.md)
|
||||
|
3
apps/README.md
Normal file
3
apps/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Applications
|
||||
- [System76 Firmware Setup](https://github.com/system76/firmware-setup.git)
|
||||
- [System76 Firmware Update](https://github.com/system76/firmware-update.git)
|
Submodule apps/firmware-update updated: ffa64d73b1...8c11731e2b
6
libs/README.md
Normal file
6
libs/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Libraries
|
||||
- [coreboot-table](https://gitlab.redox-os.org/redox-os/coreboot-table.git)
|
||||
- [ecflash](https://github.com/system76/ecflash.git)
|
||||
- [intelflash](https://gitlab.redox-os.org/redox-os/intelflash.git)
|
||||
- [intel-spi](https://github.com/system76/intel-spi.git)
|
||||
- [uefi_std](https://gitlab.redox-os.org/redox-os/uefi_std.git)
|
@@ -1,6 +0,0 @@
|
||||
echo "# Models" > README.md
|
||||
for readme in ./*/README.md
|
||||
do
|
||||
line="$(head -n 1 "$readme" | cut -d ' ' -f2-)"
|
||||
echo "- [$line]($readme)" >> README.md
|
||||
done
|
35
readme.sh
Executable file
35
readme.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
READMES=(
|
||||
"apps Applications"
|
||||
"libs Libraries"
|
||||
"models Models"
|
||||
"tools Tools"
|
||||
)
|
||||
|
||||
function recursive_readme {
|
||||
pushd "$1" > /dev/null
|
||||
echo -e "\x1B[1m$1\x1B[0m"
|
||||
echo "# $2" > README.md
|
||||
for readme in */README.md
|
||||
do
|
||||
# Get first line, removing the trailing pounds and spaces
|
||||
description="$(head -n 1 "$readme" | sed -e 's/^[#[:space:]]*//')"
|
||||
# Get submodule, if applicable
|
||||
dir="$(dirname "$readme")"
|
||||
submodule="$(git submodule status "$dir" | cut -d ' ' -f 3)"
|
||||
if [ "$submodule" == "$dir" ]
|
||||
then
|
||||
origin="$(git -C "$dir" remote get-url origin)"
|
||||
echo "- [$description]($origin)" >> README.md
|
||||
else
|
||||
echo "- [$description](./$readme)" >> README.md
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
for readme in "${READMES[@]}"
|
||||
do
|
||||
recursive_readme $readme
|
||||
done
|
6
tools/README.md
Normal file
6
tools/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Tools
|
||||
- [coreboot-collector](https://github.com/system76/coreboot-collector.git)
|
||||
- [ME Analyzer](https://github.com/platomav/MEAnalyzer.git)
|
||||
- [UEFITool](https://github.com/LongSoft/UEFITool.git)
|
||||
- [Intel ME 11.x Firmware Images Unpacker](https://github.com/ptresearch/unME11.git)
|
||||
- [Intel ME 12.x Firmware Images Unpacker](https://github.com/ptresearch/unME12.git)
|
Reference in New Issue
Block a user