Last active
December 15, 2015 15:51
-
-
Save abcang/2d94abf6d7b97751c48b to your computer and use it in GitHub Desktop.
リモートにデータをコピーしてmakeし、手元に転送するコマンド
This file contains hidden or 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
| #!/bin/bash | |
| DIR="$(basename "$(pwd)")"/ | |
| HOST="$1" | |
| OPT="$(cut -d " " -f2- <<<""$@" ")" | |
| DIST=/tmp/"$DIR"/ | |
| cd .. | |
| rsync -rtuvz --delete "$DIR" "$HOST":"$DIST" | |
| ssh "$HOST" "cd $DIST; make $OPT" | |
| rsync -rtuvz --delete "$HOST":"$DIST" "$DIR" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
remote-make.sh [options...]
って感じ