~kubuntu-netbook/kubuntu-netbook/nightly

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/ruby

require 'fileutils'

DATE = Time.now.utc.strftime("%Y%m%d")

FileUtils.rm_rf("tmp")
Dir.mkdir("tmp")
Dir.chdir("tmp")

unless File.exist?("plasma-netbook")
    %x[svn co svn://anonsvn.kde.org/home/kde/trunk/playground/base/plasma/netbook plasma-netbook]
else
    %x[svn up plasma-netbook]
end

FileUtils.rm_rf("plasma-netbook/debian")
FileUtils.cp_r("../debian", "plasma-netbook/")

Dir.chdir("plasma-netbook")

revision = IO.popen("svn info").readlines[8].split(" ")[-1]

%x[dch -D "karmic" -b -v "0.0~svn#{revision}+#{DATE}-0ubuntu0~ppa1" "Nightly Build"]

%x[dpkg-buildpackage -S -sa -k"#{ENV['DEBFULLNAME']}"]

%x[dput kubuntu-netbook-nightly ../plasma-netbook_0.0~svn#{revision}+#{DATE}-0ubuntu0~ppa1_source.changes]