diff 369cba5f938d3f804210b6e09d36c6f7ecb017fa uncommitted --- a/sys/src/libc/port/reduce +++ b/sys/src/libc/port/reduce @@ -2,15 +2,11 @@ shift objtype=$1 shift - -ls -p ../$objtype/*.[cs] >[2]/dev/null | sed 's/..$//;s/^/^/' > /tmp/reduce.$pid -# -# if empty directory, just return the input files -# -if (! ~ $status '|') { +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 - exit 0 } -echo $* | tr ' ' \012 | grep -v -f /tmp/reduce.$pid | tr \012 ' ' rm /tmp/reduce.$pid