This repository was archived by the owner on Sep 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -319,24 +319,27 @@ function set_progress( float $pc, string $label ) {
319
319
'NAME ' => $ namePath ,
320
320
];
321
321
322
- set_progress ( 5 , 'Updating repositories... ' );
323
-
324
322
$ start = 5 ;
325
323
$ end = 40 ;
324
+ $ n = 1 ;
326
325
$ repoProgress = $ start ;
326
+ $ repoCount = count ( $ repos );
327
327
328
328
foreach ( $ repos as $ source => $ target ) {
329
+ set_progress ( $ repoProgress , "Updating repositories ( $ n/ $ repoCount)... " );
330
+
329
331
$ error = shell_echo ( __DIR__ . '/new/updaterepos.sh ' ,
330
332
$ baseEnv + [
331
- 'REPOSITORIES ' => " $ source $ target " ,
333
+ 'REPO_SOURCE ' => $ source ,
332
334
]
333
335
);
336
+
334
337
if ( $ error ) {
335
338
abandon ( "Could not update repository <em> $ source</em> " );
336
339
}
337
340
338
- $ repoProgress += ( $ end - $ start ) / count ( $ repos ) ;
339
- set_progress ( $ repoProgress , ' Updating repositories... ' ) ;
341
+ $ repoProgress += ( $ end - $ start ) / $ repoCount ;
342
+ $ n ++ ;
340
343
}
341
344
342
345
// Just creates empty folders so no need for progress update
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -ex
3
3
4
- while IFS=' ' read -r repo dir; do
5
- git --git-dir=$PATCHDEMO /repositories/$repo /.git fetch --all
6
- done <<< " $REPOSITORIES"
4
+ git --git-dir=$PATCHDEMO /repositories/$REPO_SOURCE /.git fetch --all
You can’t perform that action at this time.
0 commit comments