Commit a061f676 authored by mathieso's avatar mathieso

Better error reporting.

parent 77f194b5
......@@ -74,7 +74,9 @@ if (!$fileNameListFile) {
}
echo "Copying files...\n";
$fileNamesToCopy = [];
$allFileDataOk = TRUE;
while (!feof($fileNameListFile)) {
$isThisFileOk = TRUE;
$line = strtolower(trim(fgets($fileNameListFile)));
// Skip blank lines.
if (!$line || strlen($line) == 0) {
......@@ -88,7 +90,8 @@ while (!feof($fileNameListFile)) {
// Should be a space.
if ($line[-3] !== ' ') {
echo "Expected space in $line\n";
exit(1);
$isThisFileOk = FALSE;
continue;
}
// Which module/destination?
$lastTwoChars = substr($line, -2, 2);
......@@ -131,22 +134,33 @@ while (!feof($fileNameListFile)) {
default:
echo "Bad destination in $line\n";
exit(1);
$isThisFileOk = FALSE;
};
if ($isThisFileOk) {
// Strip last three characters.
$line = substr($line, 0, -3);
// Check that the named file exists.
if (!file_exists($pathToAllConfigFilesDir . '/' . $line)) {
echo "Could not find file: $line\n";
$isThisFileOk = FALSE;
continue;
}
$fileNamesToCopy[] = [
'filename' => $line,
'destination' => $destination,
];
}
if (!$isThisFileOk) {
$allFileDataOk = FALSE;
}
}
fclose($fileNameListFile);
if (!$allFileDataOk) {
echo "Stopped, not complete.\n";
exit(1);
}
// Copy the files.
$fileCount = 0;
foreach ($fileNamesToCopy as $fileInfo) {
......
......@@ -51,26 +51,26 @@ user.role.student.yml uo
# HISTORY MODULE
# Field storage
field.storage.skilling_history.field_badge.yml
field.storage.skilling_history.field_badge.yml ho
field.storage.skilling_history.field_fib_item.yml ho
field.storage.skilling_history.field_internal_name.yml
field.storage.skilling_history.field_internal_name.yml ho
field.storage.skilling_history.field_is_correct.yml ho
field.storage.skilling_history.field_mcq_item.yml ho
field.storage.skilling_history.field_message.yml
field.storage.skilling_history.field_node.yml
field.storage.skilling_history.field_note.yml
field.storage.skilling_history.field_message.yml ho
field.storage.skilling_history.field_node.yml ho
field.storage.skilling_history.field_note.yml ho
field.storage.skilling_history.field_operation.yml ho
field.storage.skilling_history.field_page_type.yml ho
field.storage.skilling_history.field_page.yml ho
field.storage.skilling_history.field_recipient.yml
field.storage.skilling_history.field_recipient.yml ho
field.storage.skilling_history.field_response_text.yml ho
field.storage.skilling_history.field_response.yml ho
field.storage.skilling_history.field_search_text.yml
field.storage.skilling_history.field_subject.yml
field.storage.skilling_history.field_search_text.yml ho
field.storage.skilling_history.field_subject.yml ho
field.storage.skilling_history.field_submission.yml ho
field.storage.skilling_history.field_suggestion.yml
field.storage.skilling_history.field_user.yml
field.storage.skilling_history.field_view_id.yml
field.storage.skilling_history.field_suggestion.yml ho
field.storage.skilling_history.field_user.yml ho
field.storage.skilling_history.field_view_id.yml ho
# Bundles
......@@ -189,7 +189,6 @@ field.storage.node.field_class.yml co
field.storage.node.field_class_roles.yml co
field.storage.node.field_complete.yml co
field.storage.node.field_completion_score.yml co
field.storage.node.field_days.yml co
field.storage.node.field_difficulty.yml co
field.storage.node.field_difficulty_reasons.yml co
field.storage.node.field_exercise.yml co
......@@ -508,10 +507,10 @@ paragraphs.settings.yml co
paragraphs.paragraphs_type.exercise_due.yml co
core.entity_form_display.paragraph.exercise_due.default.yml co
core.entity_view_display.paragraph.exercise_due.default.yml co
field.field.paragraph.exercise_due.field_day.yml
field.field.paragraph.exercise_due.field_exercise.yml
field.field.paragraph.exercise_due.field_maximum_submissions.yml
field.field.paragraph.exercise_due.field_required.yml
field.field.paragraph.exercise_due.field_day.yml co
field.field.paragraph.exercise_due.field_exercise.yml co
field.field.paragraph.exercise_due.field_maximum_submissions.yml co
field.field.paragraph.exercise_due.field_required.yml co
# FiB question response
paragraphs.paragraphs_type.fill_in_the_blank_question_respo.yml co
......@@ -633,7 +632,6 @@ pathauto.pattern.badge.yml co
pathauto.pattern.character.yml co
pathauto.pattern.classes.yml co
pathauto.pattern.design_pages.yml co
pathauto.pattern.enrollment.yml co
pathauto.pattern.exercises.yml co
pathauto.pattern.fill_in_the_blank.yml co
pathauto.pattern.lessons.yml co
......@@ -641,10 +639,7 @@ pathauto.pattern.models.yml co
pathauto.pattern.multiple_choice_question.yml co
pathauto.pattern.pattern.yml co
pathauto.pattern.principle.yml co
pathauto.pattern.reflect_note.yml co
pathauto.pattern.rubric_item.yml co
pathauto.pattern.submission.yml co
pathauto.pattern.suggestion.yml co
system.action.pathauto_update_alias_node.yml co
system.action.pathauto_update_alias_user.yml co
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment