aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/exremote
blob: 8006d8c6771dd518f6420bf358d7b23d0d459033 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

# Helper script to execute commands on remote host

[ -n "$1" ] || { echo "Specify command to run" && exit 0; }

host=$(cat $HOME/.config/exremote/host)

ssh "$host" "source /home/$(whoami)/.profile 2> /dev/null && $1"