mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
init: only overwrites config.py, so run even if repo/ exists
Previously, `fdroid init` would exit if a repo/ subdir existed. Since it only changes config.py, that test just caused confusion. Now, only exit if config.py exists, and if repo/ does not exist, create it.
This commit is contained in:
parent
186aec46ba
commit
cc089b49b1
1 changed files with 3 additions and 2 deletions
|
|
@ -119,9 +119,10 @@ def main():
|
||||||
|
|
||||||
fdroiddir = os.getcwd()
|
fdroiddir = os.getcwd()
|
||||||
|
|
||||||
if not os.path.exists('config.py') and not os.path.exists('repo'):
|
if not os.path.exists('config.py'):
|
||||||
# 'metadata' and 'tmp' are created in fdroid
|
# 'metadata' and 'tmp' are created in fdroid
|
||||||
os.mkdir('repo')
|
if not os.path.exists('repo'):
|
||||||
|
os.mkdir('repo')
|
||||||
shutil.copy(os.path.join(examplesdir, 'fdroid-icon.png'), fdroiddir)
|
shutil.copy(os.path.join(examplesdir, 'fdroid-icon.png'), fdroiddir)
|
||||||
shutil.copyfile(os.path.join(examplesdir, 'config.py'), 'config.py')
|
shutil.copyfile(os.path.join(examplesdir, 'config.py'), 'config.py')
|
||||||
os.chmod('config.py', 0o0600)
|
os.chmod('config.py', 0o0600)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue