mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-11 09:04:01 +03:00
bin/build: begins refactor.
This commit is contained in:
parent
8bf617c77a
commit
3d517c0687
15
bin/build
15
bin/build
@ -3,6 +3,12 @@
|
||||
|
||||
require "shellwords"
|
||||
|
||||
def run(*cmd)
|
||||
puts " $ #{cmd.shelljoin}"
|
||||
system(*cmd)
|
||||
exit $?.exitstatus unless $?.exitstatus == 0
|
||||
end
|
||||
|
||||
# Given a device name, instantiates `nix-build` to build
|
||||
# everything needed to boot on that device.
|
||||
|
||||
@ -15,15 +21,10 @@ end
|
||||
|
||||
DEVICE = ARGV.shift
|
||||
|
||||
cmd = [
|
||||
run(
|
||||
"nix-build", "-A", "all",
|
||||
"--argstr", "device", DEVICE,
|
||||
*ARGV
|
||||
]
|
||||
)
|
||||
|
||||
puts " $ #{cmd.shelljoin}"
|
||||
|
||||
system(*cmd)
|
||||
|
||||
exit $?.exitstatus
|
||||
# vim: ft=ruby
|
||||
|
Loading…
Reference in New Issue
Block a user