diff --git a/sprites/jond/placeholder/.Makefile.swp b/sprites/jond/placeholder/.Makefile.swp deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/attic-me.rb b/tools/attic-me.rb new file mode 100755 index 00000000..022600a5 --- /dev/null +++ b/tools/attic-me.rb @@ -0,0 +1,33 @@ +#!/usr/bin/ruby +# attic-me.rb: find resources not symlinked to for moving to attic +# (c) 2006 Jon Dowland , see "COPYING" file +# vim: set ts=2: +require "find" + +class Regexp # mass match with [].include? + def ==(str); self.match(str); end +end + +class AtticMe < File + @@ignore = [ + /\.$/, /\.svn/, /\.txt$/i, /\.bmp$/i, + "Makefile", /aoddoom_skeletons/, + ] + + def AtticMe.main + [ "flats", "graphics", "levels", + "musics", "patches", "sounds", + "textures", "lumps", "sprites", + ].each do |dir| + files = [] + linked_to = [] + Find.find(dir) { |f| + Find.prune if @@ignore.include?(basename(f)) + files << expand_path(f) if file?(f) and not symlink?(f) + linked_to << expand_path(dir+Separator+readlink(f)) if symlink?(f) + } + puts (files - linked_to).join("\n") + end + end +end +AtticMe.main