]> granicus.if.org Git - fortune-mod/commitdiff
Extract a common expression into a variable/const.
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 18 Jan 2020 14:45:59 +0000 (16:45 +0200)
committerShlomi Fish <shlomif@shlomifish.org>
Sat, 18 Jan 2020 14:45:59 +0000 (16:45 +0200)
This is Refactoring / code cleanup.

See:

* https://refactoring.com/catalog/extractMethod.html

* https://en.wikipedia.org/wiki/Code_refactoring

* https://www.refactoring.com/

* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/

Some small optimisations may have slipped in as well.

CI-testing/continuous-integration-testing.pl

index 2085349650a1a26bbdda7ad2ed21aff3c9b7affb..7a3ed7fff8a4195a6126b189f3422cc1b0a0d25d 100644 (file)
@@ -84,10 +84,11 @@ if ($IS_WIN)
 chdir($cwd);
 $cwd->child('B')->remove_tree( { safe => 0, } );
 
+my $WIN32__DOUBLE_AMPERSAND__PROPER_HANDLING__NEEDED_PREFIX = "cd . &&";
 do_system(
     {
         cmd => [
-            "cd . && mkdir B && cd B && cmake"
+"$WIN32__DOUBLE_AMPERSAND__PROPER_HANDLING__NEEDED_PREFIX mkdir B && cd B && cmake"
                 . (
                 defined($CMAKE_PREFIX_PATH)
                 ? ( " -DCMAKE_PREFIX_PATH=" . _transform($CMAKE_PREFIX_PATH) )