Use Rakes fileutils for command execution
This commit is contained in:
parent
d1e98ff646
commit
9decbdd285
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,4 +25,6 @@
|
||||
/config/config.rb
|
||||
/vendor/
|
||||
/.bundle/
|
||||
|
||||
/debug/PackageKit/PackageKit/
|
||||
/debug/PackageKit/package/
|
||||
|
@ -9,8 +9,9 @@
|
||||
# For the script to work PackageKit source should be in the ./PackageKit
|
||||
# directory alongside this script.
|
||||
|
||||
require 'fileutils'
|
||||
require 'rake/file_utils'
|
||||
require 'pathname'
|
||||
require 'rake'
|
||||
require 'open3'
|
||||
|
||||
CWD = Pathname.new Dir.pwd
|
||||
@ -28,7 +29,7 @@ version = `git -C #{SOURCE} describe --tags --abbrev=0`
|
||||
.delete_prefix('PACKAGEKIT_')
|
||||
.gsub('_', '.')
|
||||
|
||||
exec_result = system 'meson',
|
||||
sh 'meson',
|
||||
'--buildtype=debug',
|
||||
'--prefix=/usr',
|
||||
'--libdir=/usr/lib64',
|
||||
@ -43,10 +44,9 @@ exec_result = system 'meson',
|
||||
'-Ddaemon_tests=true',
|
||||
TMP.to_s,
|
||||
SOURCE.to_s
|
||||
raise 'Meson build failed' unless exec_result
|
||||
|
||||
exec_result = system({'DESTDIR' => DESTINATION.to_s}, 'ninja', '-C', TMP.to_s, 'install')
|
||||
raise 'Ninja installation failed' unless exec_result
|
||||
sh({ 'DESTDIR' => DESTINATION.to_s },
|
||||
'ninja', '-C', TMP.to_s, 'install')
|
||||
|
||||
actual_mandir = DESTINATION + 'usr/share/man/man1'
|
||||
mandir = DESTINATION + 'usr/man/man1'
|
||||
|
Loading…
Reference in New Issue
Block a user