Add libexec stubs

This commit is contained in:
0x1eef 2023-12-07 10:19:53 -03:00
parent e29ab05c58
commit 8eaf011e71
5 changed files with 48 additions and 0 deletions

12
lib/twenty/libexec.rb Normal file
View file

@ -0,0 +1,12 @@
# frozen_string_literal: true
def spawn(exec, *argv)
libexec_dir = File.realpath(File.join(__dir__, "..", "..", "libexec", "twenty"))
Process.spawn File.join(libexec_dir, exec), *argv
end
def wait(pid)
Process.wait(pid)
rescue Interrupt
retry
end

View file

@ -0,0 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
##
# main
def main(argv)
Twenty::Command::Connect.new(argv).run
end
main(ARGV)

View file

@ -0,0 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
##
# main
def main(argv)
Twenty::Command::Disconnect.new(argv).run
end
main(ARGV)

View file

@ -0,0 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
##
# main
def main(argv)
Twenty::Command::Down.new(argv).run
end
main(ARGV)

View file

@ -0,0 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
##
# main
def main(argv)
Twenty::Command::Up.new(argv).run
end
main(ARGV)