mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 20:32:33 +00:00
21 lines
610 B
Ruby
21 lines
610 B
Ruby
def create_source_tarball suffix = ""
|
|
tarball = "#{Dir.pwd}/../mkvtoolnix-#{c(:PACKAGE_VERSION)}#{suffix}.tar.xz"
|
|
fail "#{tarball} does already exist" if FileTest.exists?(tarball)
|
|
|
|
Dir.mktmpdir do |dir|
|
|
clone_dir = "#{dir}/mkvtoolnix-#{c(:PACKAGE_VERSION)}"
|
|
commands = [
|
|
"git clone \"#{Dir.pwd}\" \"#{clone_dir}\"",
|
|
"cd #{clone_dir}",
|
|
"./autogen.sh",
|
|
"git submodule init",
|
|
"git submodule update",
|
|
"rm -rf .git",
|
|
"cd ..",
|
|
"tar cJf \"#{tarball}\" mkvtoolnix-#{c(:PACKAGE_VERSION)}",
|
|
]
|
|
system commands.join(" && ")
|
|
puts tarball
|
|
end
|
|
end
|