update dev300-m58
[ooovba.git] / solenv / bin / rmdir.pl
blob9c40ac2b20147901a7e4d86df6828febff9c7c58
2 eval 'exec perl -wS $0 ${1+"$@"}'
3 if 0;
4 #*************************************************************************
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 #
8 # Copyright 2008 by Sun Microsystems, Inc.
10 # OpenOffice.org - a multi-platform office productivity suite
12 # $RCSfile: rmdir.pl,v $
14 # $Revision: 1.2 $
16 # This file is part of OpenOffice.org.
18 # OpenOffice.org is free software: you can redistribute it and/or modify
19 # it under the terms of the GNU Lesser General Public License version 3
20 # only, as published by the Free Software Foundation.
22 # OpenOffice.org is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU Lesser General Public License version 3 for more details
26 # (a copy is included in the LICENSE file that accompanied this code).
28 # You should have received a copy of the GNU Lesser General Public License
29 # version 3 along with OpenOffice.org. If not, see
30 # <http://www.openoffice.org/license.html>
31 # for a copy of the LGPLv3 License.
33 #*************************************************************************
35 my $r_code=0;
36 if ( ! defined $ARGV[0] || "$ARGV[0]" eq "" ) {
37 print STDERR "Nothing to delete\n";
38 exit 1;
40 while ( defined $ARGV[0] ) {
41 if ( rmdir $ARGV[0] ) {
42 # exit 0;
43 } else {
44 print STDERR "ERROR removing $ARGV[0]: $!\n";
45 $r_code = 1;
47 shift @ARGV;
49 exit $r_code;