mutilate/update_readme.sh

21 lines
362 B
Bash
Raw Normal View History

2014-01-15 01:33:49 +00:00
#!/bin/bash
set -e
trap "rm -f README.md.new" EXIT
awk '
/Command-line Options/ { seen = 1; }
{ if (!seen) print $0; }
' README.md > README.md.new
echo "Command-line Options" >> README.md.new
echo "====================" >> README.md.new
echo >> README.md.new
./mutilate --help | sed "s/^/ /" >> README.md.new
mv -f README.md.new README.md
trap "" EXIT