shithub: riscv

ref: e2e4a46f26ff7268a696a45d82414fb992b648d5
dir: /rc/bin/patch/okay/

View raw version
#!/bin/rc

rfork e
if(! ~ $#* 1){
	echo usage: patch/okay dir >[1=2]
	exit usage
}

i=$1
if(! test -s $i/files || ! test -s $i/readme)
	exit 'missing files'
if(grep -v '^/[_a-zA-Z0-9.\-+/:]+ [_a-zA-Z0-9.\-+:]+$' $i/files)
	exit 'bad file list' 
exit 0