Module: Kmc::Refresher
- Defined in:
- lib/kmc/refresher.rb
Class Method Summary collapse
-
.update_packages! ⇒ Object
Fetch packages from online and delete the old packages, if any.
Class Method Details
.update_packages! ⇒ Object
Fetch packages from online and delete the old packages, if any.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/kmc/refresher.rb', line 5 def update_packages! new_packages_dir = File.join(fetch_packages, 'packages-master', 'packages') kmc_packages_path = Kmc::Configuration.packages_path output_path = File.join(kmc_packages_path, '..') remove_old_packages(kmc_packages_path) FileUtils.cp_r(new_packages_dir, output_path) end |