mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +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,11 +430,11 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
 | 
			
		|||
                          + '\n     -dname "CN=Android Debug,O=Android,C=US"')
 | 
			
		||||
            sys.exit(1)
 | 
			
		||||
        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)
 | 
			
		||||
        ssh_private_key_file = os.path.join(ssh_dir, os.path.basename(privkey))
 | 
			
		||||
        shutil.move(privkey, ssh_private_key_file)
 | 
			
		||||
        shutil.move(privkey + '.pub', ssh_private_key_file + '.pub')
 | 
			
		||||
        if os.path.exists(ssh_dir):
 | 
			
		||||
            ssh_private_key_file = os.path.join(ssh_dir, os.path.basename(privkey))
 | 
			
		||||
            shutil.move(privkey, ssh_private_key_file)
 | 
			
		||||
            shutil.move(privkey + '.pub', ssh_private_key_file + '.pub')
 | 
			
		||||
        if shutil.rmtree.avoids_symlink_attacks:
 | 
			
		||||
            shutil.rmtree(os.path.dirname(privkey))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue