mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
Remove redundant scripts.
This commit is contained in:
parent
fd1c69c06d
commit
0820d14925
4 changed files with 0 additions and 111 deletions
|
@ -1,19 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
IO.popen("find -type f -name '*.gif' | xargs md5sum |sort") do |proc|
|
|
||||||
lastline = ''
|
|
||||||
lastsum = ''
|
|
||||||
proc.each_line do |s|
|
|
||||||
s =~ /^(\w+)/
|
|
||||||
sum = $1
|
|
||||||
if sum == lastsum
|
|
||||||
print lastline
|
|
||||||
puts s
|
|
||||||
lastline = ''
|
|
||||||
else
|
|
||||||
lastsum = sum
|
|
||||||
lastline = s
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
#
|
|
||||||
# Find possibly redundant files for removal
|
|
||||||
|
|
||||||
valid_files = {}
|
|
||||||
|
|
||||||
# all files in the top level dir
|
|
||||||
|
|
||||||
for file in Dir.glob("*")
|
|
||||||
valid_files[File.expand_path(file)] = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
# all files in immediate subdirs and the files they link to
|
|
||||||
|
|
||||||
for file in Dir.glob("*/*")
|
|
||||||
stat = File.lstat(file)
|
|
||||||
if stat.symlink?
|
|
||||||
valid_files[File.expand_path(file)] = 1
|
|
||||||
linked = File.readlink(file)
|
|
||||||
linked = File.dirname(file) + "/" + linked
|
|
||||||
linked = File.expand_path(linked)
|
|
||||||
valid_files[linked] = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# seek out invalid files and build a list
|
|
||||||
|
|
||||||
puts "<ul>"
|
|
||||||
IO.popen("find | grep -v svn") do |proc|
|
|
||||||
proc.each_line do |s|
|
|
||||||
s = s.chomp
|
|
||||||
s.sub!(/^\.\//, '')
|
|
||||||
|
|
||||||
# ignore text files, non-file
|
|
||||||
if s !~ /txt$/i && File.stat(s).file? && !valid_files[File.expand_path(s)]
|
|
||||||
puts "<li> <a href='#{s}'>#{s}</a>"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
puts "</ul>"
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
#!/usr/bin/ruby
|
|
||||||
# attic-me.rb: find resources not symlinked to for moving to attic
|
|
||||||
# (c) 2006 Jon Dowland <jon@alcopop.org>, 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/, /\.mid$/,
|
|
||||||
/dummy/, "fakedemo.lmp", "misc-lumps",
|
|
||||||
"blank.gif", "nomonst.gif", "titlepic",
|
|
||||||
]
|
|
||||||
|
|
||||||
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
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
import os,sys,re
|
|
||||||
|
|
||||||
# this sucks
|
|
||||||
|
|
||||||
patches = [ x for x in os.listdir('.') if re.match(r'.*\.gif$', x) ]
|
|
||||||
patches.sort()
|
|
||||||
|
|
||||||
print '''<style type="text/css">
|
|
||||||
div {
|
|
||||||
float: left;
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
'''
|
|
||||||
print ''.join(['<div><img src="%s" /><br />%s</div>' % (x,x) for x in patches])
|
|
Loading…
Add table
Add a link
Reference in a new issue