lib/getch/states.rb in getch-0.0.2 vs lib/getch/states.rb in getch-0.0.3
- old
+ new
@@ -15,17 +15,37 @@
def format
STATES[:format] = true
save
end
+ def mount
+ STATES[:mount] = true
+ save
+ end
+
+ def stage3
+ STATES[:gentoo_base] = true
+ save
+ end
+
+ def config
+ STATES[:gentoo_config] = true
+ save
+ end
+
+ def update
+ STATES[:gentoo_update] = true
+ save
+ end
+
private
def save
File.open(@file, 'w') { |f| YAML::dump(STATES, f) }
end
def load_state()
- if File.exists? @file
+ if File.exist? @file
state_file = YAML.load_file(@file)
STATES.merge!(state_file)
else
save
STDERR.puts "Initialize states"