Skip to content

Instantly share code, notes, and snippets.

@abcang
Last active December 15, 2015 15:51
Show Gist options
  • Select an option

  • Save abcang/2d94abf6d7b97751c48b to your computer and use it in GitHub Desktop.

Select an option

Save abcang/2d94abf6d7b97751c48b to your computer and use it in GitHub Desktop.
リモートにデータをコピーしてmakeし、手元に転送するコマンド
#!/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"
@abcang
Copy link
Copy Markdown
Author

abcang commented Oct 29, 2015

remote-make.sh [options...]
って感じ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment