File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -224,21 +224,26 @@ readonly total_count="$(echo $(echo "$jar_files" | wc -l))"
224
224
exit 1
225
225
}
226
226
227
- $is_console && readonly grep_color_option=' --color=always'
227
+ findInJarFiles () {
228
+ $is_console && local -r grep_color_option=' --color=always'
228
229
229
- counter=1
230
- while read jar_file; do
231
- printResponsiveMessage " finding in jar($(( counter++ )) /$total_count ): $jar_file "
230
+ local counter=1
231
+ local jar_file
232
+ while read jar_file; do
233
+ printResponsiveMessage " finding in jar($(( counter++ )) /$total_count ): $jar_file "
232
234
233
- $command_for_list_zip " ${jar_file} " |
234
- grep $regex_mode $ignore_case_option $grep_color_option -- " $pattern " |
235
- while read file; do
236
- clearResponsiveMessage
235
+ $command_for_list_zip " ${jar_file} " |
236
+ grep $regex_mode $ignore_case_option $grep_color_option -- " $pattern " |
237
+ while read file; do
238
+ clearResponsiveMessage
237
239
238
- $is_console &&
239
- echo " $ec [1;31m${jar_file}${eend}${ec} [1;32m${seperator}${eend}${file} " ||
240
- echo " ${jar_file}${seperator}${file} "
241
- done
240
+ $is_console &&
241
+ echo " $ec [1;31m${jar_file}${eend}${ec} [1;32m${seperator}${eend}${file} " ||
242
+ echo " ${jar_file}${seperator}${file} "
243
+ done
242
244
243
- clearResponsiveMessage
244
- done < <( echo " $jar_files " )
245
+ clearResponsiveMessage
246
+ done
247
+ }
248
+
249
+ echo " $jar_files " | findInJarFiles
You can’t perform that action at this time.
0 commit comments