File tree 1 file changed +19
-3
lines changed
1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,25 @@ def force_install
78
78
when :linux
79
79
pkgname = "arduino-#{ DESIRED_ARDUINO_IDE_VERSION } "
80
80
tarfile = "#{ pkgname } -linux64.tar.xz"
81
- system ( "wget" , "https://downloads.arduino.cc/#{ tarfile } " )
82
- system ( "tar" , "xf" , tarfile )
83
- system ( "mv" , pkgname , force_install_location )
81
+ if File . exist? tarfile
82
+ puts "Arduino tarfile seems to have been downloaded already"
83
+ else
84
+ puts "Downloading Arduino binary with wget"
85
+ system ( "wget" , "https://downloads.arduino.cc/#{ tarfile } " )
86
+ end
87
+
88
+ if File . exist? pkgname
89
+ puts "Tarfile seems to have been extracted already"
90
+ else
91
+ puts "Extracting archive with tar"
92
+ system ( "tar" , "xf" , tarfile )
93
+ end
94
+
95
+ if File . exist? force_install_location
96
+ puts "Arduino binary seems to have already been force-installed"
97
+ else
98
+ system ( "mv" , pkgname , force_install_location )
99
+ end
84
100
end
85
101
end
86
102
You can’t perform that action at this time.
0 commit comments