mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-11 09:04:01 +03:00
13 lines
188 B
Ruby
13 lines
188 B
Ruby
require "shellwords"
|
|
|
|
def run(*cmd, exec: false)
|
|
puts " $ #{cmd.shelljoin}"
|
|
|
|
if exec then
|
|
Kernel.exec(*cmd)
|
|
else
|
|
system(*cmd)
|
|
end
|
|
exit $?.exitstatus unless $?.exitstatus == 0
|
|
end
|