mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 18:50:11 +02:00
server: support plain paths as a serverwebroot
For use cases where there is a web server running on the same machine where the `fdroid update` is being run, allow plain paths in the serverwebroot list. This is useful for debug repos from build servers, like: https://dev.guardianproject.info/fdroid
This commit is contained in:
parent
463bfc5639
commit
c941bf3215
@ -226,7 +226,15 @@ def main():
|
||||
standardwebroot = True
|
||||
|
||||
for serverwebroot in config.get('serverwebroot', []):
|
||||
host, fdroiddir = serverwebroot.rstrip('/').split(':')
|
||||
# this supports both an ssh host:path and just a path
|
||||
s = serverwebroot.rstrip('/').split(':')
|
||||
if len(s) == 1:
|
||||
fdroiddir = s[0]
|
||||
elif len(s) == 2:
|
||||
host, fdroiddir = s
|
||||
else:
|
||||
logging.error('Malformed serverwebroot line: ' + serverwebroot)
|
||||
sys.exit(1)
|
||||
repobase = os.path.basename(fdroiddir)
|
||||
if standardwebroot and repobase != 'fdroid':
|
||||
logging.error('serverwebroot path does not end with "fdroid", '
|
||||
|
Loading…
Reference in New Issue
Block a user