Skip to content

Commit

Permalink
Rake: Recreate the ramdisk image on each rake install (#109)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
perlun authored Nov 20, 2017
1 parent f23b0d1 commit efca151
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions programs/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit efca151

Please sign in to comment.