Skip to content

Commit

Permalink
Improve split command on mac systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
vielhuber committed Apr 23, 2024
1 parent 51d53bc commit be969f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/magicreplace.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function run($input, $output, $search_replace, $progress = false)
// where corrupted characters get introduced after splitting
// instead we use split but use another argument (-C is not available)
$command = 'split';
if( self::getOs() === 'mac' ) { $command .= ' -l 3000'; }
if( self::getOs() === 'mac' ) { $command .= ' -l 10000 -a 4'; }
elseif ( self::getOs() === 'windows' || self::getOs() === 'linux' ) { $command .= ' -C 1m'; }
else { die('unknown operating system'); }
exec($command . ' "'.$input.'" "'.$input.'-SPLITTED"');
Expand Down

0 comments on commit be969f1

Please sign in to comment.