-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: Prettify output and fix exit code
Signed-off-by: Philip Molloy <[email protected]>
- Loading branch information
Showing
1 changed file
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
declare -A shame_list | ||
shame_list=( | ||
./src/case_studies/TiogaPass.md | ||
./src/components.md | ||
./src/coreboot.u-root.systemboot/index.md | ||
./src/faq.md | ||
./src/getting_started.md | ||
./src/implementation.md | ||
./src/intro.md | ||
./src/naming.md | ||
./src/SUMMARY.md | ||
./src/u-root.md | ||
./src/utilities/cpu.md | ||
./src/utilities/dut.md | ||
./src/utilities/UEFI_Tool_Kit.md | ||
[./src/case_studies/TiogaPass.md]=1 | ||
[./src/components.md]=1 | ||
[./src/coreboot.u-root.systemboot/index.md]=1 | ||
[./src/faq.md]=1 | ||
[./src/getting_started.md]=1 | ||
[./src/implementation.md]=1 | ||
[./src/intro.md]=1 | ||
[./src/naming.md]=1 | ||
[./src/SUMMARY.md]=1 | ||
[./src/u-root.md]=1 | ||
[./src/utilities/cpu.md]=1 | ||
[./src/utilities/dut.md]=1 | ||
[./src/utilities/UEFI_Tool_Kit.md]=1 | ||
) | ||
|
||
# Find all markdown files and remove old files that need to be cleaned up | ||
shameless_list=$(comm -3 <(find . -name "*.md" | sort) \ | ||
<(printf "%s\n" "${shame_list[@]}" | sort)) | ||
ll_rv=0 | ||
for md_file in $(find . -name "*.md"); do | ||
if [[ "${shame_list[$md_file]}" ]]; then | ||
echo -e "\\e[93mSkipping ${md_file}\\e[0m" | ||
else | ||
echo -e "$ mdl \\e[1m${md_file}\\e[0m" | ||
mdl ${md_file} | ||
|
||
for md_file in ${shameless_list}; do | ||
(set -x; mdl ${md_file}) | ||
mdl_rv="$?" | ||
if [[ "${mdl_rv}" -ne 0 ]]; then | ||
ll_rv="${mdl_rv}" | ||
fi | ||
fi | ||
done | ||
exit ${ll_rv} |