Use find(1) to search files in straight fashion with the cost of external
command invocation.
This commit is contained in:
parent
fb62520419
commit
a1cd6987aa
|
@ -1,6 +1,6 @@
|
|||
#!/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
|
||||
|
@ -16,15 +16,11 @@ stop_cmd=":"
|
|||
|
||||
virecover_start()
|
||||
{
|
||||
# XXX: replace me with a script that works!
|
||||
#
|
||||
virecovery=`echo /var/tmp/vi.recover/recover.*`
|
||||
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
|
||||
recover=`find /var/tmp/vi.recover -name 'recover.*' -type f -print`
|
||||
if [ -n "$recover" ]; then
|
||||
echo "Preserving editor files."
|
||||
for i in $virecovery; do
|
||||
if [ -f $i ]; then
|
||||
sendmail -t < $i
|
||||
fi
|
||||
for i in $recover; do
|
||||
sendmail -t < $i
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue