Last active
May 7, 2018 05:23
-
-
Save bjdixon/e001ae3d07c1278a06c25e439cb5cbe7 to your computer and use it in GitHub Desktop.
build a list of scp commands for all changed files. Could | sh instead of > ./scp_changed to just invoke the scp commands instead.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git status --porcelain | awk '{if($1!="D") {print "scp " $2 " host:/var/www/host_dir/" $2 } }' > ./scp_changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment