mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
update sample and add error to reflect the default basedir: .*/fdroid/repo
For user-generated repos, the default path/URL is .*/fdroid/repo, with fdroid/ as the root where the 'fdroid' tool operates. This makes for a URL that is quite unique and easily matched automatically using patterns, like in fdroidclient. For those who don't like the standard, they can override the errror from config.py using nonstandardwebroot = True
This commit is contained in:
parent
c21ab7dbdf
commit
71020a9e6d
3 changed files with 27 additions and 8 deletions
|
@ -47,7 +47,19 @@ def main():
|
|||
print "The only commands currently supported are 'init' and 'update'"
|
||||
sys.exit(1)
|
||||
|
||||
host, fdroiddir = config['serverwebroot'].split(':')
|
||||
serverwebroot = config['serverwebroot'].rstrip('/').replace('//', '/')
|
||||
host, fdroiddir = serverwebroot.split(':')
|
||||
serverrepobase = os.path.basename(fdroiddir)
|
||||
if 'nonstandardwebroot' in config and config['nonstandardwebroot'] == True:
|
||||
standardwebroot = False
|
||||
else:
|
||||
standardwebroot = True
|
||||
if serverrepobase != 'fdroid' and standardwebroot:
|
||||
print('ERROR: serverwebroot does not end with "fdroid", '
|
||||
+ 'perhaps you meant one of these:\n\t'
|
||||
+ serverwebroot.rstrip('/') + '/fdroid\n\t'
|
||||
+ serverwebroot.rstrip('/').rstrip(serverrepobase) + 'fdroid')
|
||||
sys.exit(1)
|
||||
|
||||
repodirs = ['repo']
|
||||
if config['archive_older'] != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue