Sha256: eb865a3a23264269d49a1816902c40db13970e3d4cfbf1d7b675047cf3692446

Contents?: true

Size: 942 Bytes

Versions: 46

Compression:

Stored size: 942 Bytes

Contents

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

Autoproj::CmdLine.report do
    Autoproj::CmdLine.initialize

    if Dir.pwd.start_with?(Autoproj.remotes_dir) || Dir.pwd.start_with?(Autoproj.config_dir)
        raise ConfigError, "you cannot run autoproj switch-config from autoproj's configuration directory or one of its subdirectories"
    end

    # We must switch to the root dir first, as it is required by the
    # configuration switch code. This is acceptable as long as we
    # quit just after the switch
    Dir.chdir(Autoproj.root_dir)
    switcher = Autoproj::Ops::MainConfigSwitcher.new(Autoproj.root_dir)
    if switcher.switch_config(*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
    end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
autoproj-1.13.7 bin/autoproj-switch-config
autoproj-1.13.6 bin/autoproj-switch-config
autoproj-1.13.5 bin/autoproj-switch-config
autoproj-1.13.5.rc1 bin/autoproj-switch-config
autoproj-1.13.4 bin/autoproj-switch-config
autoproj-1.13.3 bin/autoproj-switch-config
autoproj-1.13.3.b2 bin/autoproj-switch-config
autoproj-1.13.3.b1 bin/autoproj-switch-config
autoproj-1.13.2.b4 bin/autoproj-switch-config
autoproj-1.13.2.b3 bin/autoproj-switch-config
autoproj-1.13.2.b2 bin/autoproj-switch-config
autoproj-1.13.2.b1 bin/autoproj-switch-config
autoproj-1.13.2 bin/autoproj-switch-config
autoproj-1.13.1 bin/autoproj-switch-config
autoproj-1.13.0 bin/autoproj-switch-config
autoproj-1.12.6 bin/autoproj-switch-config
autoproj-1.13.0.b8 bin/autoproj-switch-config
autoproj-1.13.0.b7 bin/autoproj-switch-config
autoproj-1.13.0.b6 bin/autoproj-switch-config
autoproj-1.13.0.b5 bin/autoproj-switch-config