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.
|
||||
-- @module utils
|
||||
|
||||
local cfg = require 'luarocks.cfg'
|
||||
local cfg = require 'luarocks.core.cfg'
|
||||
local fs = require 'luarocks.fs'
|
||||
local dir = require 'luarocks.dir'
|
||||
|
||||
local utils = {}
|
||||
|
||||
assert(cfg.init())
|
||||
fs.init()
|
||||
|
||||
--[[ CACHE ]]--
|
||||
|
||||
@@ -13,15 +16,9 @@ local utils = {}
|
||||
utils.cache = nil
|
||||
|
||||
do
|
||||
local cache
|
||||
if cfg.platforms.windows then
|
||||
cache = os.getenv("APPDATA")
|
||||
else
|
||||
cache = os.getenv("HOME").."/.cache"
|
||||
end
|
||||
cache = fs.absolute_name(cache.."/love-release")
|
||||
assert(fs.make_dir(cache))
|
||||
utils.cache = cache
|
||||
local cache = dir.dir_name(cfg.local_cache) .. "/love-release"
|
||||
assert(fs.make_dir(cache))
|
||||
utils.cache = cache
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user