好吧,这里有云:
我们在/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?什么发展环境?你如何构建你的代码?你在用什么语言? –