mirror of
https://github.com/monero-project/monero-site.git
synced 2024-12-23 12:09:49 +00:00
Correct path to (s/ressources/resources/g)
+ correct missing File.basename + correct missing guide in path + simplify
This commit is contained in:
parent
0f25ac80a1
commit
e38128d1b9
1 changed files with 5 additions and 5 deletions
|
@ -36,17 +36,17 @@ Jekyll::Hooks.register :site, :post_write do |site|
|
||||||
guides = Dir.glob(guides_dir)
|
guides = Dir.glob(guides_dir)
|
||||||
# For each guide folder, get the screenshot files
|
# For each guide folder, get the screenshot files
|
||||||
guides.each do |guide|
|
guides.each do |guide|
|
||||||
files_dir = File.join(source, "/_i18n/", lang, "/resources/user-guides/png/", guide, "/*")
|
guidename = File.basename(guide)
|
||||||
|
files_dir = File.join(guide, "/*")
|
||||||
files = Dir.glob(files_dir)
|
files = Dir.glob(files_dir)
|
||||||
# For each screenshot, do the copy
|
# For each screenshot, do the copy
|
||||||
files.each do |file|
|
files.each do |file|
|
||||||
file_path = "#{source}/_i18n/#{lang}/resources/user-guides/png/#{guide}/#{file}"
|
|
||||||
if lang == 'en'
|
if lang == 'en'
|
||||||
dest_path = "#{destination}/ressources/user-guides/png/"
|
dest_path = "#{destination}/resources/user-guides/png/#{guidename}/"
|
||||||
else
|
else
|
||||||
dest_path = "#{destination}/#{lang}/ressources/user-guides/png/"
|
dest_path = "#{destination}/#{lang}/resources/user-guides/png/#{guidename}/"
|
||||||
end
|
end
|
||||||
FileUtils.cp(file_path, dest_path)
|
FileUtils.cp(file, dest_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue