Giter VIP home page Giter VIP logo

simple_scp_sync's Introduction

Simple scp Sync

Simple perl script that can take a file name and based on a sync conf file, send it to a series of remote hosts via the nifty scp tool

Inspired by the Sublime Simple Sync package that works in more or less the same way

Primary motivation

As mentioned above, I use the Sublime Simple Sync package a lot when working with Sublime, but I also use vim heavily and in recent times, almost exlusively. This makes my dev worflow much more different that I'm accustomed to and I'd like to maintain the same dev worflow regardless of IDE

Additionally, I'd like to be able to have one configuration setting that can be used to sync to more than one host to avoide dupplication which the Sublime version did not allow me to do without modifcation

Setup

Please add a file called ~/.simple_scp_sync_config which is pretty much a json file of the format:

[
    // ...,

    {
        "hosts": [
            "kevinmurani.com"
        ],
        "username": "kmurani",  // optional, we can default to the user running the command if not needed
        "source_root_path": "/local/path/to/project/root/",
        "target_root_path": "/remote/path/to/project/root/",
        "scp_otions": "-P 22" // depends on you. If you do any extra scp options, this would be where to add them
    },

    // ...
]

NB: please be mindful of the validity of the JSON as it might not be parseable otherwise and the script will fail

Run it

perl simple_scp.sync.pl --file simple_scp.sync.pl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.