File tree 1 file changed +13
-2
lines changed 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,24 @@ def main():
116
116
if sys .argv [1 ] != "install" :
117
117
fatal ("Only 'install' command supported" )
118
118
119
+ to_install = []
120
+
119
121
i = 2
120
- while sys .argv [i ][0 ] == "-" :
122
+ while i < len ( sys . argv ) and sys .argv [i ][0 ] == "-" :
121
123
opt = sys .argv [i ][1 ]
122
124
i += 1
123
125
if opt == "p" :
124
126
install_path = sys .argv [i ]
125
127
i += 1
128
+ elif opt == "r" :
129
+ list_file = sys .argv [i ]
130
+ i += 1
131
+ with open (list_file ) as f :
132
+ while True :
133
+ l = f .readline ()
134
+ if not l :
135
+ break
136
+ to_install .append (l .rstrip ())
126
137
else :
127
138
fatal ("Unknown/unsupported option: " + opt )
128
139
@@ -138,7 +149,7 @@ def main():
138
149
139
150
print ("Installing to: " + install_path )
140
151
141
- to_install = sys .argv [i :]
152
+ to_install . extend ( sys .argv [i :])
142
153
# sets would be perfect here, but don't depend on them
143
154
installed = []
144
155
while to_install :
You can’t perform that action at this time.
0 commit comments