Skip to content

Instantly share code, notes, and snippets.

@mangar
Created October 17, 2015 22:54
Show Gist options
  • Select an option

  • Save mangar/77ab3ef55a9862036c80 to your computer and use it in GitHub Desktop.

Select an option

Save mangar/77ab3ef55a9862036c80 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
require 'fileutils'
puts "Started @ #{Time.now}"
starting_point = "./output"
structure_count = 282344
FileUtils.remove_dir(starting_point,true)
FileUtils.mkdir_p(starting_point)
1.upto(structure_count) do |count|
FileUtils.mkdir_p("#{starting_point}/var/www/vhosts/#{count}/config")
FileUtils.mkdir_p("#{starting_point}/var/www/vhosts/#{count}/public")
FileUtils.mkdir_p("#{starting_point}/var/www/vhosts/#{count}/log")
FileUtils.mkdir_p("#{starting_point}/var/www/vhosts/#{count}/tmp")
puts "#{count}" if (count % 1000) == 0
end
puts "Finished @ #{Time.now}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment