1
list = `cat subdirs`
2
root = `pwd`.chomp
3
for it in Dir['*']
4
    it.chomp!
5
   begin
6
	Dir.chdir(it)
7
	pwd=`pwd`.chomp
8
	puts pwd
9
	for y in ['docmessages', 'docs', 'messages']
10
		begin
11
			Dir.chdir("#{y}/extragear-multimedia")
12
            current = `pwd`.chomp
13
            puts "now in #{current}"
14
            stableBranchDir = "/home/ian/work/l10n/stable_branch/#{current.gsub(/^#{root}\//,'').chomp}"
15
            if not File.exist?(stableBranchDir) then
16
                puts "oh noes, #{stableBranchDir} doesn't exist"
17
                `svn mkdir #{stableBranchDir}`
18
                puts "still doesn't exist" unless File.exist?(stableBranchDir)
19
            end
20
			Dir['*amarok*'].each { | file |
21
                `svn remove #{stableBranchDir}/#{file}`
22
                `svn copy #{file} #{stableBranchDir}`
23
            }
24
			Dir.chdir('../..')
25
		rescue StandardError
26
			puts $!
27
		end
28
	end
29
	Dir.chdir('..')
30
   rescue
31
	puts $!
32
   end
33
end