3 # $Header: /home/ralph/netatalk/rsync/netatalk/contrib/shell_utils/Attic/apple_rm,v 1.2 2000-08-09 14:12:06 rufustfirefly Exp $
6 # Revision 1.2 2000-08-09 14:12:06 rufustfirefly
7 # /usr/local/bin/perl -> /usr/bin/perl and portability fixes
9 # Revision 1.1 2000/08/09 14:08:06 rufustfirefly
10 # Shell utils from http://www.-genome.wi.mit.edu/ftp/distribution/software/Bass/bass-1.29/apple_util/ (initial import)
12 # Revision 1.1 1996/04/03 02:13:14 lstein
13 # Added all these files because they're essential utilities.
15 # Revision 1.1 1996/02/09 18:21:35 will
21 Usage: $0 filename ...
22 Do an apple remove, remove the resource fork as well
25 die $USAGE if @ARGV < 1;
27 foreach $path (@ARGV) {
29 print STDERR "file $path does not exist\n";
33 ($dir, $file) = &split_dir_file($path);
36 system $cmd || die "error executing $cmd";
38 $cmd = "rm '$dir/.AppleDouble/$file'";
39 system $cmd || die "error executing $cmd";
42 # split a file path into a directory and file name.
46 @path_elems = split(/\//, $path);
48 my $file = pop(@path_elems);
53 $dir = join('/', @path_elems);