-
-
Save cpjhenry/c136be4ad209c1204bdb to your computer and use it in GitHub Desktop.
TODO
This file contains hidden or 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
#!/bin/bash | |
# Check for TODO notes in script directory | |
# 2015-02-06 | |
# 2015-03-03 : filter out symbolic link, add formatting to display | |
searchloc="bin/*" | |
for i in $searchloc; do | |
[ ! -h $i ] && td=$(grep -s --exclude todo "TODO" $i) | |
[ ! -h $i ] && fm=$(grep -s --exclude todo "FIXME" $i) | |
if [ "$td" ]; then | |
echo "$i:" | |
echo "$td" | sed -e 's/^#//' -e 's/^ *//g' -e 's/^TODO//' -e 's/^ *: */ /g' | |
unset i | |
fi | |
if [ "$fm" ]; then | |
[ $i ] && echo "$i:" | |
echo "$fm" | sed -e 's/^#//' -e 's/^ *//g' -e 's/^FIXME//' -e 's/^ *: */ /g' | |
fi | |
unset td; unset fm | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment