mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-08 16:30:28 +03:00
makebuildserver: cache defaults to ~/.cache/fdroidserver
This also provides a config option to override that default. ~/.cache is a standard location on GNU/Linux machines for cached content. It is also good to have the cache outside of the git repo in case `git clean -fdx` is run, which would delete all files in the directory that are not part of the git repo, including buildserver/cache/
This commit is contained in:
parent
3bd8ef2c8c
commit
cda8fa00f5
2 changed files with 10 additions and 2 deletions
|
|
@ -50,6 +50,7 @@ config = {
|
|||
'arch64': False,
|
||||
'basebox': 'jessie32',
|
||||
'baseboxurl': 'https://f-droid.org/jessie32.box',
|
||||
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
||||
'cpus': 1,
|
||||
'memory': 3584,
|
||||
}
|
||||
|
|
@ -72,9 +73,9 @@ if options.clean:
|
|||
vagrant(['destroy', '-f'], cwd=serverdir, printout=options.verbose)
|
||||
|
||||
# Update cached files.
|
||||
cachedir = os.path.join('buildserver', 'cache')
|
||||
cachedir = config['cachedir']
|
||||
if not os.path.exists(cachedir):
|
||||
os.mkdir(cachedir)
|
||||
os.makedirs(cachedir, 0755)
|
||||
|
||||
cachefiles = [
|
||||
('android-sdk_r24.4.1-linux.tgz',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue