File: tdrec

package info (click to toggle)
devtodo 0.1.20%2Bgit20200830.0ad52b0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 964 kB
  • sloc: ansic: 5,307; cpp: 3,908; perl: 112; sh: 106; makefile: 45; csh: 2
file content (24 lines) | stat: -rwxr-xr-x 536 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
# recursive todo - runs todo in all subdirectories which have a todo list in
# them.  Kindof useful for me since I stick todo lists everywhere..
#
# Does not follow symbolic links, to avoid recursing forever.
#
# Brian Herlihy
#

function tdrec () {
	## If todo file exists, say where we are and show todo list
	if [ -f .todo ] ; then
		echo "-- TODO list for `pwd` --"
		todo "$@"
	fi
	for file in * ; do
		if [ -d "./$file" -a ! -h "./$file" ] ; then
			( cd "./$file"; tdrec "$@")
		fi
	done
}

tdrec "$@"