Files
ubicloud/rhizome/host/bin/setup-vhost-block-backend
Hadi Moshayedi b2a06bdeb0 Rhizome: Ubiblk Setup
Adds `setup-vhost-block-backend` and accompanying library. These
download and install Ubiblk to `/opt/vhost-block-backend/$version`.

Usage:

```
/path/to/setup-vhost-block-backend verb version
```

- `verb`: currently only supported verb is `install`.
- `version`: Ubiblk version
2025-06-11 11:24:17 -07:00

27 lines
476 B
Ruby
Executable File

#!/usr/bin/env ruby
# frozen_string_literal: true
require_relative "../../common/lib/util"
require_relative "../lib/vhost_block_backend"
require "fileutils"
unless (verb = ARGV.shift)
puts "expected verb as argument"
exit 1
end
unless (version = ARGV.shift)
puts "expected version as argument"
exit 1
end
vhost_block_backend = VhostBlockBackend.new(version)
case verb
when "install"
vhost_block_backend.download
else
puts "Unknown verb: #{verb}"
exit 1
end