@@ -106,12 +106,12 @@ func DownloadCoresAndToolsAndLibraries(t *testing.T) {
106
106
OsUrl {Os : "i686-mingw32" , Url : "http://downloads.arduino.cc/tools/coan-5.2-i686-mingw32.zip" },
107
107
OsUrl {Os : "x86_64-apple-darwin" , Url : "http://downloads.arduino.cc/tools/coan-5.2-x86_64-apple-darwin.zip" },
108
108
}},
109
- Tool {Name : "ctags" , Version : "5.8-patched " ,
109
+ Tool {Name : "ctags" , Version : "5.8-arduino1 " ,
110
110
OsUrls : []OsUrl {
111
- OsUrl {Os : "i686-pc-linux-gnu" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">patched -i686-pc-linux-gnu.tar.bz2"},
112
- OsUrl {Os : "x86_64-pc-linux-gnu" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">patched -x86_64-pc-linux-gnu.tar.bz2"},
113
- OsUrl {Os : "i686-mingw32" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">patched -i686-mingw32.zip"},
114
- OsUrl {Os : "x86_64-apple-darwin" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">patched -x86_64-apple-darwin.zip"},
111
+ OsUrl {Os : "i686-pc-linux-gnu" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">arduino1 -i686-pc-linux-gnu.tar.bz2"},
112
+ OsUrl {Os : "x86_64-pc-linux-gnu" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">arduino1 -x86_64-pc-linux-gnu.tar.bz2"},
113
+ OsUrl {Os : "i686-mingw32" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">arduino1 -i686-mingw32.zip"},
114
+ OsUrl {Os : "x86_64-apple-darwin" , Url : "http://downloads.arduino.cc/tools/ctags-5.8-%3Cspan%20class="x x-first x-last">arduino1 -x86_64-apple-darwin.zip"},
115
115
}},
116
116
}
117
117
@@ -536,6 +536,14 @@ func downloadAndUnpackTool(tool Tool, url string, targetPath string) error {
536
536
}
537
537
defer os .RemoveAll (unpackFolder )
538
538
539
+ _ , err = os .Stat (filepath .Join (targetPath , tool .Name ))
540
+ if err == nil {
541
+ err = os .RemoveAll (filepath .Join (targetPath , tool .Name ))
542
+ if err != nil {
543
+ return utils .WrapError (err )
544
+ }
545
+ }
546
+
539
547
if len (files ) == 1 && files [0 ].IsDir () {
540
548
err = os .MkdirAll (filepath .Join (targetPath , tool .Name ), os .FileMode (0755 ))
541
549
if err != nil {
0 commit comments