mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-10 20:23:39 +00:00
ab6455f68c
Several deprecated functions were removed: `Dir.exists?`, `File.exists?` & `FileTest.exists?`. Instead of those `FileTest.exist?` must be used (without the `s`). See the release notes for Ruby 3.2.0 as well as the issue for removing the functions: https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ https://bugs.ruby-lang.org/issues/17391
21 lines
609 B
Ruby
21 lines
609 B
Ruby
def create_source_tarball suffix = ""
|
|
tarball = "#{Dir.pwd}/../mkvtoolnix-#{c(:PACKAGE_VERSION)}#{suffix}.tar.xz"
|
|
fail "#{tarball} does already exist" if FileTest.exist?(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
|