3
# Ruby script for generating Amarok tarball releases from KDE SVN
5
# (c) 2005 Mark Kretschmann <kretschmann@kde.org>
6
# Some parts of this code taken from cvs2dist
7
# License: GNU General Public License V2
16
branch = `kdialog --inputbox "Enter branch name: " "branches/stable"`.chomp()
18
tag = `kdialog --inputbox "Enter tag name: "`.chomp()
20
puts("Unknown option #{$1}. Use --branch or --tag.\n")
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()
32
i18nlangs = `cat subdirs`
35
topmakefile = File.new( "CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
40
for part in ['digikam']
41
puts "Copying #{lang}'s #{part} over.. "
42
`svn cat #{protocol}://#{user}@svn.kde.org/home/kde/#{branch}/l10n-kde4/#{lang}/messages/extragear-graphics/#{part}.po 2> /dev/null | tee #{part}.po `
44
if FileTest.size( "#{part}.po" ) == 0
45
File.delete( "#{part}.po" )
46
puts "Delete File #{part}.po"
49
makefile = File.new( "CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
50
makefile << "file(GLOB _po_files *.po)\n"
51
makefile << "GETTEXT_PROCESS_PO_FILES( #{lang} ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )\n"
57
topmakefile << "add_subdirectory( #{lang} )\n"