Skip to content

Commit 426a531

Browse files
fixup! ci: adjust yml_config_to_ors_config_conversion.sh
1 parent 4b666d5 commit 426a531

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/utils/yml_config_to_ors_config_conversion.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ output_file=$2
1313
###########################
1414
echo "Validate input file:"
1515
echo "- checking if the input file is a valid yaml file"
16-
yq eval '.' $input_file > /dev/null 2>&1 || exit 1
17-
16+
yq 'true' $input_file /dev/null || exit 1
1817
# Fail if ors.engine.profiles.car.enabled='false' can't be found access with schema .result | select(.property_history != null) | .property_history | map(select(.event_name == "Sold"))[0].date'
1918
echo "- checking if ors.engine.source_file exists and has 'source_file' property"
2019
yq --exit-status '.ors.engine | has("source_file")' $input_file > /dev/null || exit 1
@@ -38,12 +37,12 @@ yq -i '.ors.engine.source_file = "ors-api/src/test/files/heidelberg.osm.gz"' "$o
3837

3938
## Add # to the beginning of each line that is not empty or a comment
4039
echo "- Comment everything"
41-
sed -i '' '/^\s*[^#]/ s/^/#/' "$output_file" || exit 1
40+
sed -i '/^\s*[^#]/ s/^/#/' "$output_file" || exit 1
4241

4342
echo "- Uncomment ors, engine and source_file"
44-
sed -i '' -e '/^#ors:/s/^#//' -e '/^#.*engine:/s/^#//' -e '/^#.*source_file:/s/^#//' "$output_file"
43+
sed -i -e '/^#ors:/s/^#//' -e '/^#.*engine:/s/^#//' -e '/^#.*source_file:/s/^#//' "$output_file"
4544

4645
echo "- Uncomment subsequent lines for profiles.car.enabled in ors.engine"
47-
sed -i '' -e '/^# profiles:/,/^# enabled:/ s/^#//' "$output_file"
46+
sed -i -e '/^# profiles:/,/^# enabled:/ s/^#//' "$output_file"
4847

4948
echo "Parsing complete. Result saved to $output_file"

0 commit comments

Comments
 (0)