Table of Contents
A while back I wrote remote_target, a tool for replicating project directories to remote machines using rsync on a per-project basis. This is done using a .remote_target
file in the project root which specifies the hostname, connection information and remote directory to push to.
This is a rewrite of this in C++, using YAML config files instead of INI, and using an rsync backend instead of SFTP. This means that it's a lot faster, compiles to a static binary, and has a much more future-proof configuration format.
To simply install remote_target on a Linux machine, head on over to the releases and download the latest binary for your platform, and place it in a directory that's accessible in your path (for example ~/.local/bin). That's it!
If a prebuilt binary isn't available for your platform yet, you can install from source using the instructions below.
To install from source, follow the instructions below:
In order to build the tool you'll need a compiler compatible with C++17 and make.
Building the source code on a Unix-like environment with g++ and make is exceptionally easy:
- Clone the repo with it's submodules
git clone --recurse-submodules https://github.com/dylan-robins/remote_target_plus_plus cd remote_target_plus_plus
- Build the software
make
That's it! If you want to use a different compiler, or change the compilation options, just edit the Makefile. I should learn to use automake or cmake at some point, but this project is simple enough.
Usage: remote_target [options]
Optional arguments:
-h --help shows help message and exits [default: false]
-v --version prints version information and exits [default: false]
--config Path to a configuration file
--dry-run If present, doesn't actually run the replication [default: false]
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENCE for more information.