Utility to fix executable perms in MANUAL* and images, data and src dirs
This commit is contained in:
parent
4c8478a4cd
commit
b7eb990818
1 changed files with 26 additions and 0 deletions
26
utils/wesnoth-fixperms
Executable file
26
utils/wesnoth-fixperms
Executable 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
|
Loading…
Add table
Reference in a new issue