tracks/java/scripts/canonical_data_check.sh in trackler-2.2.1.52 vs tracks/java/scripts/canonical_data_check.sh in trackler-2.2.1.53

- old
+ new

@@ -60,10 +60,11 @@ echo "Config file not found at $config_file_path." exit 1 fi track_exercise_slugs=$(jq '.exercises[] | select(has("deprecated") | not) | .slug' $config_file_path | tr -d "\"") +update_needed_count=0 for slug in $track_exercise_slugs do canonical_data_folder_path="$path_to_problem_specifications/exercises/$slug" @@ -86,19 +87,26 @@ track_exercise_version_file_path="$path_to_track/exercises/$slug/.meta/version" if ! [ -f "$track_exercise_version_file_path" ] then echo "$slug: needs update or version file (v$canonical_data_version)." + update_needed_count=$((update_needed_count + 1)) continue fi track_data_version=$(cat $track_exercise_version_file_path) if [ "$track_data_version" = "$canonical_data_version" ] then # echo "$slug: up-to-date." continue else + update_needed_count=$((update_needed_count + 1)) echo "$slug: needs update (v$track_data_version -> v$canonical_data_version)." fi done + +if [ $update_needed_count -eq 1 ] +then + echo "All exercises are up to date!" +fi