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.19.26 share/rbbt_commands/app/install
rbbt-util-5.19.25 share/rbbt_commands/app/install
rbbt-util-5.19.24 share/rbbt_commands/app/install
rbbt-util-5.19.23 share/rbbt_commands/app/install
rbbt-util-5.19.22 share/rbbt_commands/app/install
rbbt-util-5.19.21 share/rbbt_commands/app/install
rbbt-util-5.19.20 share/rbbt_commands/app/install
rbbt-util-5.19.19 share/rbbt_commands/app/install
rbbt-util-5.19.18 share/rbbt_commands/app/install
rbbt-util-5.19.17 share/rbbt_commands/app/install
rbbt-util-5.19.16 share/rbbt_commands/app/install
rbbt-util-5.19.15 share/rbbt_commands/app/install
rbbt-util-5.19.14 share/rbbt_commands/app/install
rbbt-util-5.19.13 share/rbbt_commands/app/install
rbbt-util-5.19.12 share/rbbt_commands/app/install
rbbt-util-5.19.11 share/rbbt_commands/app/install
rbbt-util-5.19.10 share/rbbt_commands/app/install
rbbt-util-5.19.9 share/rbbt_commands/app/install
rbbt-util-5.19.8 share/rbbt_commands/app/install
rbbt-util-5.19.7 share/rbbt_commands/app/install