8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / bnu / Teardown
blob119d5161342743c6ec04ef66627aab61f551f63f
1 #!/usr/bin/sh
3 # CDDL HEADER START
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
8 # with the License.
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]
21 # CDDL HEADER END
23 #ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:Teardown 1.5 */
25 export IFS PATH
26 IFS="
28 PATH="/usr/bin"
31 # This shell tries to convert uucp from the QFT format back to the
32 # the regular HoneyDanBer format and removes all sub directories
33 # that created while running the QFT version of uucp.
36 echo "Converting uucp from QFT Format back to HoneyDanBer format\n"
38 SPOOL=/var/spool/uucp
39 # chdir to remote spool directory
40 cd $SPOOL
41 if [ `pwd` != "$SPOOL" ]
42 then
43 echo "CAN'T cd to $SPOOL"
44 echo "$0 failed."
45 exit 0
47 for d in */?
49 # chdir to grade directories of the remote
50 cd $d
51 if [ "$?" = 0 ]
52 then
53 # move everything to parent (machine) directory
54 find . -print | cpio -pdvm ..
55 if [ "$?" = 0 ]
56 then
57 # now remove everything in this directory
58 rm -rf *
60 cd $SPOOL
61 # if grade directory is now empty, remove it.
62 rmdir $d
64 done >/dev/null 2>&1