Skip to content

Commit

Permalink
delete before update
Browse files Browse the repository at this point in the history
  • Loading branch information
spider-mane committed Apr 4, 2021
1 parent e1200aa commit e3dc3ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/prefill
Expand Up @@ -244,6 +244,10 @@ do {
} while (($modify = strtolower(read_from_console($consent . ' [y/N/q] '))) != 'y');
echo "\n";

// delete files
foreach ($delete as $file) {
shell_exec("rm -f $root/$file");
}
// update and relocate boilerplate
foreach ($files as $file) {
$contents = file_get_contents($file);
Expand All @@ -268,10 +272,6 @@ foreach ($files as $file) {

file_put_contents($file, $contents);
}
// delete files
foreach ($delete as $file) {
shell_exec("rm -f $root/$file");
}
// rename files
foreach ($rename as $file => $renameFile) {
$file = realpath("$root/$file");
Expand Down

0 comments on commit e3dc3ee

Please sign in to comment.