Skip to content
Permalink
Browse files

Remove bootstrap store: bootstrap into the real one instead

  • Loading branch information...
matthewd committed Mar 11, 2019
1 parent fafb42d commit c9aaee125b849128adc4dc5cec7b22f91ed6a476
Showing with 11 additions and 7 deletions.
  1. +0 −1 bin/metaruby
  2. +11 −6 bootstrap.rb
@@ -1,6 +1,5 @@
#!/bin/bash

export GEL_STORE=`dirname $0`/../tmp/bootstrap/store
export GEL_LOCKFILE=`dirname $0`/../Gemfile.lock

exec `dirname $0`/gruby "$@"
@@ -13,14 +13,19 @@ def usage

Dir.chdir __dir__
Dir.mkdir "tmp" unless Dir.exist?("tmp")
Dir.mkdir "tmp/bootstrap" unless Dir.exist?("tmp/bootstrap")
Dir.mkdir "tmp/bootstrap/store" unless Dir.exist?("tmp/bootstrap/store")
Dir.mkdir "tmp/bootstrap/store/ruby" unless Dir.exist?("tmp/bootstrap/store/ruby")

store = Gel::Store.new("tmp/bootstrap/store/ruby")
loader = Gel::LockLoader.new("Gemfile.lock")
# `gel install-gem pub_grub`
require_relative "lib/gel/catalog"
require_relative "lib/gel/work_pool"
Gel::WorkPool.new(2) do |work_pool|
catalog = Gel::Catalog.new("https://rubygems.org", work_pool: work_pool)

Gel::Environment.install_gem([catalog], "pub_grub", nil, output: $stderr)
end

loader.activate(nil, store, install: true, output: $stderr)
# `gel install`
loader = Gel::LockLoader.new("Gemfile.lock")
loader.activate(nil, Gel::Environment.store.inner, install: true, output: $stderr)

else
usage

0 comments on commit c9aaee1

Please sign in to comment.
You can’t perform that action at this time.