mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-24 02:36:15 +00:00
21 lines
449 B
Bash
Executable file
21 lines
449 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
# Run the live-code bits within the markup files. See README.md for details.
|
|
|
|
if [ $# -ge 1 ]; then
|
|
names="$@"
|
|
names=$(echo "$names" | sed 's/\.md\.in//g')
|
|
else
|
|
names=$(echo *.md.in | sed 's/\.md\.in//g')
|
|
fi
|
|
|
|
for name in $names; do
|
|
echo Generating $name.md
|
|
if [ -f $name.md ]; then # Won't exist yet on first run
|
|
chmod u+w $name.md
|
|
fi
|
|
genmd-filter < $name.md.in > $name.md
|
|
chmod 400 $name.md
|
|
done
|