mirror of
https://github.com/TangentFoxy/love-release.git
synced 2025-07-28 02:52:20 +00:00
Update to LuaRocks 3
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
--- Provides utility functions and constants.
|
--- Provides utility functions and constants.
|
||||||
-- @module utils
|
-- @module utils
|
||||||
|
|
||||||
local cfg = require 'luarocks.cfg'
|
local cfg = require 'luarocks.core.cfg'
|
||||||
local fs = require 'luarocks.fs'
|
local fs = require 'luarocks.fs'
|
||||||
|
local dir = require 'luarocks.dir'
|
||||||
|
|
||||||
local utils = {}
|
local utils = {}
|
||||||
|
|
||||||
|
assert(cfg.init())
|
||||||
|
fs.init()
|
||||||
|
|
||||||
--[[ CACHE ]]--
|
--[[ CACHE ]]--
|
||||||
|
|
||||||
@@ -13,15 +16,9 @@ local utils = {}
|
|||||||
utils.cache = nil
|
utils.cache = nil
|
||||||
|
|
||||||
do
|
do
|
||||||
local cache
|
local cache = dir.dir_name(cfg.local_cache) .. "/love-release"
|
||||||
if cfg.platforms.windows then
|
assert(fs.make_dir(cache))
|
||||||
cache = os.getenv("APPDATA")
|
utils.cache = cache
|
||||||
else
|
|
||||||
cache = os.getenv("HOME").."/.cache"
|
|
||||||
end
|
|
||||||
cache = fs.absolute_name(cache.."/love-release")
|
|
||||||
assert(fs.make_dir(cache))
|
|
||||||
utils.cache = cache
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user