mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Merge commit 'refs/merge-requests/129' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
4f6fb4df82
2 changed files with 5 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
import glob, os, sys, re
|
||||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import time
|
||||
import operator
|
||||
|
@ -43,6 +44,9 @@ def read_config(opts, config_file='config.py'):
|
|||
if not os.path.isfile(config_file):
|
||||
print "Missing config file - is this a repo directory?"
|
||||
sys.exit(2)
|
||||
st = os.stat(config_file)
|
||||
if st.st_mode & stat.S_IRWXG or st.st_mode & stat.S_IRWXO:
|
||||
print("WARNING: unsafe permissions on config.py (should be 0600)!")
|
||||
|
||||
options = opts
|
||||
if not hasattr(options, 'verbose'):
|
||||
|
|
|
@ -109,6 +109,7 @@ def main():
|
|||
os.mkdir('repo')
|
||||
shutil.copy(os.path.join(examplesdir, 'fdroid-icon.png'), repodir)
|
||||
shutil.copyfile(os.path.join(examplesdir, 'config.sample.py'), 'config.py')
|
||||
os.chmod('config.py', 0o0600)
|
||||
else:
|
||||
print('Looks like this is already an F-Droid repo, cowardly refusing to overwrite it...')
|
||||
sys.exit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue