mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-06 01:11:07 +03:00
init: generate opensc-fdroid.cfg rather than copying from examples
This file is so simple, it is better to skip the complexity of trying to find the installed examples folder, especially when considering Windows and macOS, with their odd paths.
This commit is contained in:
parent
838eee355f
commit
54257f8f6a
1 changed files with 3 additions and 5 deletions
|
@ -211,12 +211,10 @@ def main():
|
|||
opensc_so = '/usr/lib/opensc-pkcs11.so'
|
||||
logging.warning('No OpenSC PKCS#11 module found, '
|
||||
+ 'install OpenSC then edit "opensc-fdroid.cfg"!')
|
||||
with open(os.path.join(examplesdir, 'opensc-fdroid.cfg'), 'r') as f:
|
||||
opensc_fdroid = f.read()
|
||||
opensc_fdroid = re.sub('^library.*', 'library = ' + opensc_so, opensc_fdroid,
|
||||
flags=re.MULTILINE)
|
||||
with open('opensc-fdroid.cfg', 'w') as f:
|
||||
f.write(opensc_fdroid)
|
||||
f.write('name = OpenSC\nlibrary = ')
|
||||
f.write(opensc_so)
|
||||
f.write('\n')
|
||||
elif os.path.exists(keystore):
|
||||
to_set = ['keystorepass', 'keypass', 'repo_keyalias', 'keydname']
|
||||
if repo_keyalias:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue