mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03: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
1 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue