Skip to content
/ rrun Public

rsync the current directory and run a command over ssh

License

Notifications You must be signed in to change notification settings

bfirsh/rrun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

rrun

rrun rsyncs the current directory then runs a command over ssh.

This seems to be a really common pattern, and I was surprised to find there isn't a good solution for this. So, here's a ridiculously simple shell script.

It works a bit like this:

$ rrun bfirsh-dev python train.py
Copying current directory...
...
sent 512 bytes  received 48 bytes  373.33 bytes/sec
total size is 11341  speedup is 20.25

Running 'python train.py'...
Choo choo!


$ rrun bfirsh-dev
Copying current directory...
...
sent 512 bytes  received 48 bytes  373.33 bytes/sec
total size is 11341  speedup is 20.25

Running '$SHELL'...
ben@bfirsh-dev:~/rexec/myproject$ 

It rsyncs the current directory into ~/rexec/<dirname>, then runs the command you pass over ssh. That's it really.

Install

curl https://raw.githubusercontent.com/bfirsh/rrun/main/rrun > /usr/local/bin/rrun
chmod +x /usr/local/bin/rrun

About

rsync the current directory and run a command over ssh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages