Sha256: e07e3d26585940bc77d2112bcdbb239de7c91174137d144a7fa736fcc6005c24

Contents?: true

Size: 655 Bytes

Versions: 324

Compression:

Stored size: 655 Bytes

Contents

#!/usr/bin/env ruby

require 'rbbt'
require 'rbbt-util'
require 'rbbt/workflow'

app = ARGV[0]
repo = ARGV[1]

raise "No app specified" if app.nil?

app_dir = Rbbt.etc.app_dir.exists? ? Rbbt.etc.app_dir.read.strip : Rbbt.apps.find(:user)

FileUtils.mkdir_p app_dir unless File.exists? app_dir

Misc.in_dir(app_dir) do
  if File.exists? app
    Misc.in_dir(app) do
      `git pull`
    end
  else
    if repo.nil?
      repo_base_url = Rbbt.etc.app_repo.exists? ? Rbbt.etc.app_repo.read.strip : 'https://github.com/Rbbt-Apps/'
      repo = File.join(repo_base_url, app + '.git')
    end
    Log.warn "Cloning #{ repo }"
    `git clone "#{repo}"`
  end
end

Version data entries

324 entries across 324 versions & 1 rubygems

Version Path
rbbt-util-5.20.9 share/rbbt_commands/app/install
rbbt-util-5.20.8 share/rbbt_commands/app/install
rbbt-util-5.20.7 share/rbbt_commands/app/install
rbbt-util-5.20.6 share/rbbt_commands/app/install
rbbt-util-5.20.5 share/rbbt_commands/app/install
rbbt-util-5.20.4 share/rbbt_commands/app/install
rbbt-util-5.20.3 share/rbbt_commands/app/install
rbbt-util-5.20.2 share/rbbt_commands/app/install
rbbt-util-5.20.1 share/rbbt_commands/app/install
rbbt-util-5.20.0 share/rbbt_commands/app/install
rbbt-util-5.19.37 share/rbbt_commands/app/install
rbbt-util-5.19.36 share/rbbt_commands/app/install
rbbt-util-5.19.35 share/rbbt_commands/app/install
rbbt-util-5.19.34 share/rbbt_commands/app/install
rbbt-util-5.19.32 share/rbbt_commands/app/install
rbbt-util-5.19.31 share/rbbt_commands/app/install
rbbt-util-5.19.30 share/rbbt_commands/app/install
rbbt-util-5.19.29 share/rbbt_commands/app/install
rbbt-util-5.19.28 share/rbbt_commands/app/install
rbbt-util-5.19.27 share/rbbt_commands/app/install