5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 1995 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
27 #ident "%Z%%M% %I% %E% SMI"
34 # files must be readable,
35 # directories must be readable/searchable
36 # otherwise increment error count and skip it.
39 if test -d "$1" -a {"$1" = "." -o "$1" = ".."}
41 elif test -r "$1" -a -f "$1"
43 elif test -r "$1" -a -x "$1" -a -d "$1"
45 else error
=`expr 0$error + 1`
47 printf "`gettext 'uuto: %s%s: file not readable'`\n" $UUP $1 >&2
48 elif test -d "$1"; then
49 printf "`gettext 'uuto: %s%s: directory not readable/searchable'`\n" $UUP $1 >&2
51 printf "`gettext 'uuto: %s%s: file/directory not found'`\n" $UUP $1 >&2
56 if test -n "$d" -a -n "$user"
60 ( cd $i; UUP
="$UUP$i/"
62 error
=`expr 0$error + 0$?`
66 if test -n "$f" -a -n "$user"
68 uucp $a $f $remote!~
/receive
/$user/$mysys/$UUP
69 error
=`expr 0$error + 0$?`
85 mesg
="Usage: uuto [-mp] files remote!user\n"
87 trap "trap '' 0; exit $?" 1 2 3 13 15
90 while getopts mp FLAG
; do
96 ?
) gettext "$mesg" >&2
101 shift `expr $OPTIND - 1`
103 # be sure have both files and destination
109 # skip file names to get to destination
115 # the recipient arg: remote!user
116 # remote may be omitted (default is this machine)
117 # must have at least !user
118 remote
=`expr $1 : '\(.*\)!'`
119 user
=`expr $1 : '.*!\(.*\)'`
122 gettext "uuto: incomplete destination -- must specify user\n" >&2