mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
nightly: only write SSH key files if ~/.ssh exists on dev's machine
This commit is contained in:
parent
553c9aa7e7
commit
bf945a3062
1 changed files with 4 additions and 4 deletions
|
@ -430,8 +430,8 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
+ '\n -dname "CN=Android Debug,O=Android,C=US"')
|
+ '\n -dname "CN=Android Debug,O=Android,C=US"')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
ssh_dir = os.path.join(os.getenv('HOME'), '.ssh')
|
ssh_dir = os.path.join(os.getenv('HOME'), '.ssh')
|
||||||
os.makedirs(os.path.dirname(ssh_dir), exist_ok=True)
|
|
||||||
privkey = _ssh_key_from_debug_keystore(options.keystore)
|
privkey = _ssh_key_from_debug_keystore(options.keystore)
|
||||||
|
if os.path.exists(ssh_dir):
|
||||||
ssh_private_key_file = os.path.join(ssh_dir, os.path.basename(privkey))
|
ssh_private_key_file = os.path.join(ssh_dir, os.path.basename(privkey))
|
||||||
shutil.move(privkey, ssh_private_key_file)
|
shutil.move(privkey, ssh_private_key_file)
|
||||||
shutil.move(privkey + '.pub', ssh_private_key_file + '.pub')
|
shutil.move(privkey + '.pub', ssh_private_key_file + '.pub')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue