X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=blobdiff_plain;f=tools%2Flist-files.pl;h=7b5de8e4ffd1812cef2347c276254ae9adac4138;hp=2ed8ba84cabfa8907b8802d5c317053a9db18280;hb=45d6c08f587212574d05360222eea780b2a5c56a;hpb=5a4ae2f676698eb4c47e399858b7459269bf3fae diff --git a/tools/list-files.pl b/tools/list-files.pl index 2ed8ba8..7b5de8e 100644 --- a/tools/list-files.pl +++ b/tools/list-files.pl @@ -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; $_} - ; +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