Created
June 11, 2016 23:33
-
-
Save exerro/fe54b78051e5575cbc89eccdab718697 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function copy( a, b ) | |
if love.filesystem.isDirectory( a ) then | |
for i, file in ipairs( love.filesystem.getDirectoryItems( a ) ) do | |
copy( a .. "/" .. file, b .. "/" .. file ) | |
end | |
else | |
love.filesystem.write( b, love.filesystem.read( a ) ) | |
end | |
end | |
if not love.filesystem.isDirectory "plugins" then | |
copy( "data/plugins", "plugins" ) | |
end | |
if not love.filesystem.isDirectory "user" then | |
copy( "data/user", "user" ) | |
end | |
if not love.filesystem.isDirectory "resources" then | |
copy( "data/resources", "resources" ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment