Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Add flag to sync extensions back to local #22

Merged
merged 1 commit into from
Apr 20, 2019
Merged

Add flag to sync extensions back to local #22

merged 1 commit into from
Apr 20, 2019

Conversation

ammario
Copy link
Member

@ammario ammario commented Apr 20, 2019

Resolves #20

@ammario
Copy link
Member Author

ammario commented Apr 20, 2019

rsync always does a full sync on the way back no matter what. It's like it's ignoring the --size-only flag, very confused. Going to work on this later.

@scsmithr
Copy link
Contributor

Might have something to do with the trailing slash. I think we'll always want a trailing slash on the src (not just the local src), and leave it off of the dest.

@ammario
Copy link
Member Author

ammario commented Apr 20, 2019

So... the problem was I missed the / logic and so I was just infinitely nesting directories.

@ammario ammario requested review from scsmithr and nhooyr April 20, 2019 20:39
var (
skipSyncFlag = flag.Bool("skipsync", false, "skip syncing local settings and extensions to remote host")
sshFlags = flag.String("ssh-flags", "", "custom SSH flags")
syncBack = flag.Bool("b", false, "sync extensions back on termination")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make this flag more descriptive, like -syncback and ssh-flags should also become sshflags for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I choose the shorter flag because I felt like this would be a common option. I can add short versions of both though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats fair, lets leave it at -b, I think less ways to do the same thing is better.

@ammario ammario merged commit d24e822 into master Apr 20, 2019
@ammario ammario deleted the sync-back branch April 20, 2019 23:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync remote extensions to local on SIGINT
3 participants