+Restore the cursor position after the file got opened.
[nethome.git] / bin / cvsutil
index fd833d5..0ebe138 100755 (executable)
@@ -1,6 +1,14 @@
 #! /usr/bin/perl
 #
 #      $Id$
+#
+#      Recommended aliases:
+#              alias cvsfiles='cvsutil --files --print'
+#              alias cvsignores='cvsutil --ignores --print'
+#              alias cvsignoresall='cvsutil --ignores --workings --print'
+#              alias cvsignoresrm='cvsutil --ignores --rm'
+#              alias cvsignoresrmall='cvsutil --ignores --workings --rm'
+#              alias cvsignoresallrm='cvsutil --ignores --workings --rm'
 
 use strict;
 use warnings;
@@ -8,6 +16,7 @@ use warnings;
 use Getopt::Long;
 use Cwd qw(chdir fastgetcwd);
 use Errno qw(ENOENT);
+use File::Remove qw(remove);
 
 use constant ENTRIES  =>"CVS/Entries";
 use constant CVSIGNORE=>".cvsignore";
@@ -195,7 +204,8 @@ sub localactionrm
 {
 my($filename)=@_;
 
-       if (!unlink $filename) {
+       # '\1' for '-r':
+       if (!remove \1,$filename) {
                mayfatal "File \"$_\" cannot be removed" if !$!{ENOENT};
                }
 }