Utility to fix executable perms in MANUAL* and images, data and src dirs

This commit is contained in:
Isaac Clerencia Perez 2005-10-11 19:11:57 +00:00
parent 4c8478a4cd
commit b7eb990818

26
utils/wesnoth-fixperms Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/ruby
files = (`find . -maxdepth 1 -name "MANUAL*" -perm -100`).split("\n")
dirs = ["data","images","src"]
dirs.each { | dir |
dirfiles = (`find #{dir} -perm -100 -a -type f`).split("\n")
files.concat(dirfiles)
}
removed = false
files.each { |file|
if (`svn propget svn:executable #{file} 2>/dev/null` == "*\n")
print "Removing svn:executable property from #{file}\n"
system("svn propdel svn:executable #{file}")
removed = true
else
files.delete(file)
end
}
if removed
system("svn ci #{files.join(' ')}")
end