Class: Appril::CLI::Update

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/appril-cli/update.rb

Instance Method Summary collapse

Methods included from Helpers

#create_dirname_for, #expanded_path, #extract_namespace, #fatal_error!, #format_error, #make_executable

Constructor Details

#initialize(path) ⇒ Update

Returns a new instance of Update.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/appril-cli/update.rb', line 7

def initialize path
  FileUtils.rm_rf(path / 'core')

  Dir.chdir APP_DIR do
    Dir['**/*'].select {|e| File.file?(e)}.each do |file|
      update_file(path, file)
    end
  end

  post_update(path)
  puts "Done"
end