From efca1513a5066062a2db9288340bfc20b7a099cd Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Mon, 20 Nov 2017 23:36:37 +0200 Subject: [PATCH] Rake: Recreate the ramdisk image on each rake install (#109) Previously, it was created each time the `default` task was run. This change fixes it so that you can run `rake install` over and over again. The programs/Rakefile file was also fixed to create the folder for the config/servers/boot/startup script. --- Rakefile | 2 +- programs/Rakefile | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index b2d8e538..8c4f7912 100644 --- a/Rakefile +++ b/Rakefile @@ -37,7 +37,7 @@ task :create_ramdisk_image do end desc 'Compiles and installs chaos' -task install: [:install_folders, :iso_image] +task install: [:create_ramdisk_image, :install_folders, :iso_image] task :install_folders do FileUtils.rm_rf INSTALL_ROOT diff --git a/programs/Rakefile b/programs/Rakefile index e9f1b507..12c6eb7f 100644 --- a/programs/Rakefile +++ b/programs/Rakefile @@ -18,8 +18,13 @@ task :clean do end task install: :default do - # Disabled for now, since the code that generates the folder structure isn't here yet. - # sh 'mcopy -o startup u:/config/servers/boot' + # The volume is always recreated on 'rake install', so the folder structure must be created from scratch. + sh 'mmd u:/config' + sh 'mmd u:/config/servers' + sh 'mmd u:/config/servers/boot' + sh 'mcopy -o startup u:/config/servers/boot' + + sh 'mmd u:/programs' SUBFOLDERS.each do |folder| sh "cd #{folder} && #{RAKE_COMMAND} install"