@@ -324,11 +324,11 @@ function set_progress( float $pc, string $label ) {
324
324
$ repoProgress = $ start ;
325
325
326
326
foreach ( $ repos as $ source => $ target ) {
327
- $ cmd = make_shell_command ( $ baseEnv + [
328
- ' REPOSITORIES ' => " $ source $ target " ,
329
- ], __DIR__ . ' /new/updaterepos.sh ' );
330
-
331
- $ error = shell_echo ( $ cmd );
327
+ $ error = shell_echo ( __DIR__ . ' /new/updaterepos.sh ' ,
328
+ $ baseEnv + [
329
+ ' REPOSITORIES ' => " $ source $ target " ,
330
+ ]
331
+ );
332
332
if ( $ error ) {
333
333
abandon ( "Could not update repository <em> $ source</em> " );
334
334
}
@@ -343,50 +343,49 @@ function set_progress( float $pc, string $label ) {
343
343
return "$ k $ v " ;
344
344
}, array_keys ( $ repos ), array_values ( $ repos ) ) );
345
345
346
- $ cmd = make_shell_command ( $ baseEnv + [
347
- ' BRANCH ' => $ branch ,
348
- ' COMPOSER_HOME ' => __DIR__ . ' /composer ' ,
349
- ' REPOSITORIES ' => $ reposString ,
350
- ], __DIR__ . ' /new/checkout.sh ' );
351
-
352
- $ error = shell_echo ( $ cmd );
346
+ $ error = shell_echo ( __DIR__ . ' /new/checkout.sh ' ,
347
+ $ baseEnv + [
348
+ ' BRANCH ' => $ branch ,
349
+ ' COMPOSER_HOME ' => __DIR__ . ' /composer ' ,
350
+ ' REPOSITORIES ' => $ reposString ,
351
+ ]
352
+ );
353
353
if ( $ error ) {
354
354
abandon ( "Could not check out wiki. " );
355
355
}
356
356
357
357
set_progress ( 60 , 'Installing your wiki... ' );
358
358
359
- $ cmd = make_shell_command ( $ baseEnv + [
360
- ' WIKINAME ' => $ wikiName ,
361
- ' SERVER ' => $ server ,
362
- ' SERVERPATH ' => $ serverPath ,
363
- ' LANGUAGE ' => $ language ,
364
- ], __DIR__ . ' /new/install.sh ' );
365
-
366
- $ error = shell_echo ( $ cmd );
359
+ $ error = shell_echo ( __DIR__ . ' /new/install.sh ' ,
360
+ $ baseEnv + [
361
+ ' WIKINAME ' => $ wikiName ,
362
+ ' SERVER ' => $ server ,
363
+ ' SERVERPATH ' => $ serverPath ,
364
+ ' LANGUAGE ' => $ language ,
365
+ ]
366
+ );
367
367
if ( $ error ) {
368
368
abandon ( "Could not install wiki. " );
369
369
}
370
370
371
371
set_progress ( 80 , 'Fetching and applying patches... ' );
372
372
373
373
foreach ( $ commands as $ i => $ command ) {
374
- $ cmd = make_shell_command ( $ baseEnv + $ command [0 ], $ command [1 ] );
375
- $ error = shell_echo ( $ cmd );
374
+ $ error = shell_echo ( $ command [1 ], $ baseEnv + $ command [0 ] );
376
375
if ( $ error ) {
377
376
abandon ( "Could not apply patch {$ patchesApplied [$ i ]}. " );
378
377
}
379
378
}
380
379
381
380
set_progress ( 90 , 'Setting up wiki content... ' );
382
381
383
- $ cmd = make_shell_command ( $ baseEnv + [
384
- ' MAINPAGE ' => $ mainPage ,
385
- ' USE_PROXY ' => $ useProxy ,
386
- ' USE_INSTANT_COMMONS ' => $ useInstantCommons ,
387
- ], __DIR__ . ' /new/postinstall.sh ' );
388
-
389
- $ error = shell_echo ( $ cmd );
382
+ $ error = shell_echo ( __DIR__ . ' /new/postinstall.sh ' ,
383
+ $ baseEnv + [
384
+ ' MAINPAGE ' => $ mainPage ,
385
+ ' USE_PROXY ' => $ useProxy ,
386
+ ' USE_INSTANT_COMMONS ' => $ useInstantCommons ,
387
+ ]
388
+ );
390
389
if ( $ error ) {
391
390
abandon ( "Could not setup wiki content. " );
392
391
}
0 commit comments