mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-10-31 23:35:00 -04:00
read_yaml helper function
This commit is contained in:
parent
f3486d57b8
commit
a58827ce0f
@ -23,6 +23,10 @@ def new_octo_dir(*subdirs)
|
||||
File.join(NEW_OCTO, *subdirs)
|
||||
end
|
||||
|
||||
def read_yaml(path)
|
||||
YAML.load(File.read(path))
|
||||
end
|
||||
|
||||
begin
|
||||
# Make local copy of imathis/octopress
|
||||
FileUtils.rm_rf new_octo_dir
|
||||
@ -44,7 +48,7 @@ begin
|
||||
FileUtils.cp_r new_octo_dir('.themes', 'classic'), old_octo_dir('.themes')
|
||||
|
||||
# migrate configuration
|
||||
local_config = YAML.load(File.read(old_octo_dir("_config.yml")))
|
||||
local_config = read_yaml(old_octo_dir("_config.yml"))
|
||||
|
||||
FileUtils.mkdir_p old_octo_dir('_config')
|
||||
FileUtils.cp_r File.join(OCTO_CONFIG_DEST, 'defaults'), old_octo_dir('_config'), :verbose => true, :remove_destination => true
|
||||
|
Loading…
Reference in New Issue
Block a user