我在编译之前要到几个不同地址去 checkout 库,所以每次都要在 Mac 的终端里去敲下面的命令:
svn checkout http://address1/lib1 ~/myProject/lib1/
svn checkout http://address1/lib1 ~/myProject/lib1/
svn checkout http://address1/lib1 ~/myProject/lib1/
于是很自然我就建一个脚本文件checkout.sh
文件内容:
#!/bin/bash
svn checkout http://address1/lib1 ~/myProject/lib1/
svn checkout http://address2/lib2 ~/myProject/lib2/
svn checkout http://address3/lib3 ~/myProject/lib3/
然后我以为以后可以直接./checkout.sh
就刷刷刷的全部更新了,
结果脚本只执行了第一行svn checkout http://address1/lib1 ~/myProject/lib1/
然后就停了。
请问有谁可以指点一下我应该怎么搞吗?
1
blacklee 2015-09-24 13:31:43 +08:00
加一行 ``set -x`` 调试吧
|
2
JerningChan 2015-09-24 14:45:59 +08:00
#!/bin/bash
cd (~/myProject/lib1/)把()内的换成绝对路径 svn checkout http://address1/lib1 cd (~/myProject/lib2/)把()内的换成绝对路径 svn checkout http://address2/lib2 cd (~/myProject/lib3/)把()内的换成绝对路径 svn checkout http://address3/lib3 试试这样!! |