好吧,這裏有雲:
我們在/usr/local/bin
名爲snk
的rsync的腳本,看起來像:節省的rsync:
#! /bin/bash
# this script will rsync -a the ../repo directory
# with the ../computations directory on various architectures.
# leave this script here (in the repo!) and create a symlink to it from someplace in your $PATH
# get this host
HOST=${HOSTNAME}
# define various hosts in order to dictate specific rsync commands
hostA="someHost"
hostB="someOtherHost"
if [ "$HOST" = "$hostA" ]
then
rsync -zvai --exclude=.svn /full/path/to/repo/on/hostA/ /full/path/to/computations
elif [ "$HOST" = "$hostB" ]
then
rsync -zvai --exclude=.svn /full/path/to/repo/on/hostB/ /full/path/to/computations
fi
然後,我們去了谷歌和發現:this qeustion關於「VIM '並給了它一個鏡頭。看看我的新.vimrc
文件的這一部分:
:if system('pwd') =~ "/full/path/to/base/of/repo"
: au BufWritePost * !snk
:endif
這是一階近似一個解決我的問題,我希望它能幫助!
謝謝vipraptor!
告訴我們更多。什麼OS?什麼發展環境?你如何構建你的代碼?你在用什麼語言? –