Use find(1) to search files in straight fashion with the cost of external

command invocation.
This commit is contained in:
nisimura 2000-10-09 05:33:53 +00:00
parent fb62520419
commit a1cd6987aa
1 changed files with 5 additions and 9 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $NetBSD: virecover,v 1.3 2000/07/26 00:11:49 lukem Exp $ # $NetBSD: virecover,v 1.4 2000/10/09 05:33:53 nisimura Exp $
# #
# PROVIDE: virecover # PROVIDE: virecover
@ -16,15 +16,11 @@ stop_cmd=":"
virecover_start() virecover_start()
{ {
# XXX: replace me with a script that works! recover=`find /var/tmp/vi.recover -name 'recover.*' -type f -print`
# if [ -n "$recover" ]; then
virecovery=`echo /var/tmp/vi.recover/recover.*`
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
echo "Preserving editor files." echo "Preserving editor files."
for i in $virecovery; do for i in $recover; do
if [ -f $i ]; then sendmail -t < $i
sendmail -t < $i
fi
done done
fi fi
} }