This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
| 1 |
#!/usr/bin/env ruby |
| 2 |
# |
| 3 |
# Ruby script for generating Amarok tarball releases from KDE SVN |
| 4 |
# |
| 5 |
# (c) 2005 Mark Kretschmann <markey@web.de> |
| 6 |
# Some parts of this code taken from cvs2dist |
| 7 |
# License: GNU General Public License V2 |
| 8 |
|
| 9 |
|
| 10 |
branch = "branches/stable" |
| 11 |
tag = "" |
| 12 |
|
| 13 |
unless $*.empty?() |
| 14 |
case $*[0] |
| 15 |
when "--branch" |
| 16 |
branch = `kdialog --inputbox "Enter branch name: " "branches/stable"`.chomp() |
| 17 |
when "--tag" |
| 18 |
tag = `kdialog --inputbox "Enter tag name: "`.chomp() |
| 19 |
else |
| 20 |
puts("Unknown option #{$1}. Use --branch or --tag.\n") |
| 21 |
end |
| 22 |
end |
| 23 |
|
| 24 |
# Ask user for targeted application version |
| 25 |
user = `kdialog --inputbox "Your SVN user:"`.chomp() |
| 26 |
protocol = `kdialog --radiolist "Do you use https or svn+ssh?" https https 0 "svn+ssh" "svn+ssh" 1`.chomp() |
| 27 |
|
| 28 |
puts "\n" |
| 29 |
puts "**** l10n ****" |
| 30 |
puts "\n" |
| 31 |
|
| 32 |
i18nlangs = `svn cat #{protocol}://#{user}@svn.kde.org/home/kde/#{branch}/l10n/subdirs` |
| 33 |
Dir.mkdir( "l10n" ) |
| 34 |
Dir.chdir( "l10n" ) |
| 35 |
# docs |
| 36 |
for lang in i18nlangs |
| 37 |
lang.chomp!() |
| 38 |
Dir.mkdir(lang) |
| 39 |
Dir.chdir(lang) |
| 40 |
for part in ['data', 'messages', 'docmessages', 'docs'] |
| 41 |
puts "Copying #{lang}'s #{part} over.. " |
| 42 |
Dir.mkdir(part) |
| 43 |
Dir.chdir(part) |
| 44 |
docdirname = "l10n/#{lang}/#{part}/extragear-multimedia" |
| 45 |
`svn co #{protocol}://#{user}@svn.kde.org/home/kde/#{branch}/#{docdirname}` |
| 46 |
print docdirname; |
| 47 |
unless FileTest.exists?( "extragear-multimedia" ) |
| 48 |
Dir.chdir("..") |
| 49 |
Dir.rmdir(part) |
| 50 |
next |
| 51 |
end |
| 52 |
puts( "done.\n" ) |
| 53 |
Dir.chdir("..") |
| 54 |
end |
| 55 |
Dir.chdir("..") |
| 56 |
end |
| 57 |
|
| 58 |
puts "\n" |