Change-Id: Ic5ef3e9ae7984cc6c84ef99553bc94a7d44c3929 Reviewed-on: https://cl.tvl.fyi/c/depot/+/551 Reviewed-by: tazjin <mail@tazj.in>
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			385 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			385 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| # Utility script to run a gerrit command on the depot host via ssh.
 | |
| # Reads the username from TVL_USERNAME, or defaults to $(whoami)
 | |
| { pkgs, ... }:
 | |
| 
 | |
| pkgs.writeShellScriptBin "gerrit" ''
 | |
|   TVL_USERNAME=''${TVL_USERNAME:-$(whoami)}
 | |
|   if which ssh &>/dev/null; then
 | |
|     ssh=ssh
 | |
|   else
 | |
|     ssh="${pkgs.openssh}/bin/ssh"
 | |
|   fi
 | |
|   exec $ssh $TVL_USERNAME@code.tvl.fyi -p 29418 -- gerrit $@
 | |
| ''
 |