summaryrefslogtreecommitdiff
path: root/sys/src/libc/port/reduce
blob: 0deb098c4e668846725e5213d03a16055d08819b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
O=$1
shift
objtype=$1
shift
if(ls -p ../$objtype/*.[cs] >[2]/dev/null | sed 's/..$//;s/^/^/' > /tmp/reduce.$pid) {
	echo $* | tr ' ' \012 | grep -v -f /tmp/reduce.$pid | tr \012 ' '
}
if not {
	# if empty directory, just return the input files
	echo $*
}
rm /tmp/reduce.$pid