Commit 618f328d authored by luigi1111's avatar luigi1111

Merge !1025

Ruby screenshots script: Correct path to (s/ressources/resources/g)

See merge request monero-project/monero-site!1025
parents c30118ed e38128d1
......@@ -36,17 +36,17 @@ Jekyll::Hooks.register :site, :post_write do |site|
guides = Dir.glob(guides_dir)
# For each guide folder, get the screenshot files
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)
# For each screenshot, do the copy
files.each do |file|
file_path = "#{source}/_i18n/#{lang}/resources/user-guides/png/#{guide}/#{file}"
if lang == 'en'
dest_path = "#{destination}/ressources/user-guides/png/"
dest_path = "#{destination}/resources/user-guides/png/#{guidename}/"
else
dest_path = "#{destination}/#{lang}/ressources/user-guides/png/"
dest_path = "#{destination}/#{lang}/resources/user-guides/png/#{guidename}/"
end
FileUtils.cp(file_path, dest_path)
FileUtils.cp(file, dest_path)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment