]> gitweb @ CieloNegro.org - sugar.git/blobdiff - tools/list-files.pl
Auto commit by The Sugar System.
[sugar.git] / tools / list-files.pl
index 2ed8ba84cabfa8907b8802d5c317053a9db18280..7b5de8e4ffd1812cef2347c276254ae9adac4138 100644 (file)
@@ -4,18 +4,22 @@ use Smart::Comments;
 use List::MoreUtils qw(any);
 use File::Spec;
 
-my @RE_IGNORED = map {
-    s/\./\\./g;
-    s/\+/\\+/g;
-
-    s/\?/.?/g;
-    s/\*/.*?/g;
-
-    qr/^$_$/;
-  }
-  grep {length}
-  map  {tr/\n//d; $_}
-  <DATA>;
+my @RE_IGNORED = do {
+    open my $fh, '<', 'IGNORE' or die $!;
+    map {
+        s/\./\\./g;
+        s/\+/\\+/g;
+
+        s/\?/.?/g;
+        s/\*/.*?/g;
+
+        qr/^$_$/;
+      }
+      grep {length}
+      map  {s/^\s*#//; $_}
+      map  {tr/\n//d; $_}
+      <$fh>;
+};
 
 main();
 
@@ -55,71 +59,3 @@ sub find {
     }
     @d;
 }
-
-__DATA__
-*~
-.*cache*
-.*history*
-.CFUserTextEncoding
-.DS_Store
-.ICEauthority
-.MacOSX
-.Trash
-.Xauthority
-.cabal
-.cpan
-.dbus
-.dvdcss
-.easytag
-.elisp
-.esd_auth
-.emacs.d
-.eshell
-.firefox
-.fontconfig
-.fonts
-.gconf*
-.gimp*
-.glimpse*
-.gnome2*
-.gnucash
-.gnupg
-.gstreamer-0.10
-.htpasswd
-.ido.last*
-.jungledisk*
-.kde
-.localized
-.mozilla
-.mpd
-.mplayer/DVDKeys
-.mplayer/skins
-.nautilus
-.navi2ch/*.net
-.navi2ch/*.com
-.nh-todo
-.pan
-.projects.ede
-.qt
-.recently-used*
-.rnd
-.s9x
-.scribus
-.skk-*
-.snes*
-.ssh
-.thumbnails
-.tome
-.trackballs
-.uim.d
-.unison
-.viminfo
-.w3m/bookmark.bak.html
-.w3m/config
-.w3m/*arrived
-.w3m/*cookie
-.w3m/*sessions
-.wine
-.xchat2*
-.zcomp*
-.zfunc