Skip to content

Commit

Permalink
Remove bootstrap store: bootstrap into the real one instead
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewd committed Mar 11, 2019
1 parent fafb42d commit c9aaee1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 0 additions & 1 deletion bin/metaruby
Original file line number Diff line number Diff line change
@@ -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 "$@"
17 changes: 11 additions & 6 deletions bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9aaee1

Please sign in to comment.