]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/port/mkfilelist
devmnt: deal with partial response for Tversion request in mntversion()
[plan9front.git] / sys / src / 9 / port / mkfilelist
1 #!/bin/rc
2
3 rfork e
4 switch($#*){
5 case 1
6         RE=`{echo *.c | sed 's/ /|/g; s/.*/^(&)$/'}
7         if(~ $RE '^(*.c)$')
8                 LIST=`{builtin cd $1; ls *.c }
9         if not
10                 LIST=`{builtin cd $1; ls *.c | grep -v ''$RE''}
11         echo $LIST | sed 's/\.c//g; s/ +/|/g'
12 case *
13         exit 'usage'
14 }
15 exit ''