2020-06-16 02:54:26 +02:00
|
|
|
# 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)}
|
2020-06-22 01:29:09 +02:00
|
|
|
if which ssh &>/dev/null; then
|
2020-06-16 02:54:26 +02:00
|
|
|
ssh=ssh
|
|
|
|
else
|
|
|
|
ssh="${pkgs.openssh}/bin/ssh"
|
|
|
|
fi
|
2020-06-22 01:29:09 +02:00
|
|
|
exec $ssh $TVL_USERNAME@code.tvl.fyi -p 29418 -- gerrit $@
|
2020-06-16 02:54:26 +02:00
|
|
|
''
|