2012-02-28 84 views
1

我正在寫一個bash腳本,我需要克隆一個git代表。我該如何做到這一點,當它出現時,它會自動將值yes放入?腳本中的Git克隆

============================================================================== 
= NOTICE                  = 
============================================================================== 
= RVM has encountered a new or modified .rvmrc file in the current directory = 
= This is a shell script and therefore may contain any shell commands.  = 
=                   = 
= Examine the contents of this file carefully to be sure the contents are = 
= safe before trusting it! (Choose v[iew] below to view the contents)  = 
============================================================================== 
Do you wish to trust this .rvmrc file? (/root/The-Three-Little-Pigs-Siri-Proxy/.rvmrc) 
y[es], n[o], v[iew], c[ancel]> 

的Ubuntu 10.10 32位

+0

什麼RVM,爲什麼它與你的Git干擾克隆? – 2012-02-28 00:27:58

+0

@GregHewgill - 它是Ruby版本管理器。腳本可能會克隆並放入其中。如果該文件夾具有.rvmrc文件,則會觸發rvm掛鉤。無論如何,刪除了git標籤並添加了rvm。 – manojlds 2012-02-28 00:37:48

+0

正確,腳本克隆然後將其放入它。 – awmusic12635 2012-02-28 00:39:22

回答

3

在你的home目錄創建一個文件,.rvmrc並添加下面一行到它:

rvm_trust_rvmrcs_flag=1 

或信託與文件:

rvm rvmrc trust /root/The-Three-Little-Pigs-Siri-Proxy/ 
+0

/家或我克隆它的目錄? – awmusic12635 2012-02-28 00:37:53

+1

我認爲他的意思是'/ home/username',或'〜' – 2012-02-28 01:49:09

1

,你可以看看到expect