39
39
puts "You need to accept the Xcode license agreement to be able to use the Xcode command-line tools."
40
40
system ( 'xcodebuild -license' )
41
41
end
42
+
43
+ $tasks = [ "Homebrew" , "Google Chrome" , "Java SE Development Kit 8" , "Android SDK" , "CocoaPods" , "CocoaPods" , "pip" , "six" , "xcodeproj" , "Android emulator" , "HAXM (Hardware accelerated Android emulator)" ]
44
+ $count = 1
45
+ puts "This setup script will request to install the following on your machine:"
46
+ $tasks. each_with_index do |st , index |
47
+ puts "#{ index + 1 } . #{ st } "
48
+ end
49
+
42
50
# Help with installing other dependencies
43
51
44
52
@@ -62,6 +70,9 @@ def execute(script, warning_message, run_as_root = false)
62
70
end
63
71
64
72
def install ( program_name , message , script , run_as_root = false , show_all_option = true )
73
+ puts "Step #{ $count} of #{ $tasks. length } :"
74
+ $count += 1
75
+
65
76
if $answer != "a"
66
77
puts "Allow the script to install " + program_name + "?"
67
78
if show_all_option
@@ -153,8 +164,12 @@ def install_environment_variable(name, value)
153
164
execute ( "echo y | #{ sdk_manager } \" extras;android;m2repository\" " , error_msg )
154
165
execute ( "echo y | #{ sdk_manager } \" extras;google;m2repository\" " , error_msg )
155
166
167
+ puts "Step #{ $count} of #{ $tasks. length } :"
168
+ $count += 1
156
169
puts "Do you want to install Android emulator? (y/n)"
157
170
if $silentMode || gets . chomp . downcase == "y"
171
+ puts "Step #{ $count} of #{ $tasks. length } :"
172
+ $count += 1
158
173
puts "Do you want to install HAXM (Hardware accelerated Android emulator)? (y/n)"
159
174
if $silentMode || gets . chomp . downcase == "y"
160
175
execute ( "echo y | #{ sdk_manager } \" extras;intel;Hardware_Accelerated_Execution_Manager\" " , error_msg )
0 commit comments