Sha256: 6fb4db6f4005dbaceffdbc4a94b0e469665a5893a04a579e5da6d19ba737e6d7

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

#! /usr/bin/env ruby
require 'autoproj'
require 'autoproj/ops/main_config_switcher'

root_dir = Dir.pwd
if File.exists?(File.join(root_dir, 'autoproj', "manifest"))
    raise ConfigError.new, "this installation is already bootstrapped. Remove the autoproj directory if it is not the case"
end

Autoproj::CmdLine.report do
    switcher = Autoproj::Ops::MainConfigSwitcher.new(root_dir)
    begin
        switcher.bootstrap(*ARGV)
        manifest = Autoproj::Manifest.load(File.join(Autoproj.config_dir, 'manifest'))
        update = Autoproj::Ops::Configuration.new(manifest, Autoproj::Ops.loader)
        update.update_configuration
        Autoproj.save_config

        STDERR.puts <<EOTEXT


#{color('autoproj bootstrap successfully finished', :green, :bold)}

#{color('To further use autoproj and the installed software', :bold)}, you
must add the following line at the bottom of your .bashrc:
  source #{root_dir}/#{Autoproj::ENV_FILENAME}

WARNING: autoproj will not work until your restart all
your consoles, or run the following in them:
  $ source #{root_dir}/#{Autoproj::ENV_FILENAME}

#{color('To import and build the packages', :bold)}, you can now run
  aup
  amake

The resulting software is installed in
  #{root_dir}/install

EOTEXT

    rescue RuntimeError
        STDERR.puts <<-EOTEXT
#{color('autoproj bootstrap failed', :red, :bold)}
To retry, first source the #{Autoproj::ENV_FILENAME} script with
  source #{root_dir}/#{Autoproj::ENV_FILENAME}
and then re-run autoproj bootstrap with
  autoproj bootstrap <vcs_type> <vcs_url> <vcs_options>

where
  'vcs_type' is git, svn, darcs, cvs
  'vcs_url' is the vcs-specific URL to the repository, and
  'vcs_options' are optional values that can be given to the chosen VCS
    EOTEXT

        raise
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
autoproj-1.11.0.b3 bin/autoproj-bootstrap