Minor simplification

parent 2944b897
Pipeline #3132 passed with stages
in 39 seconds
#!/bin/bash
# Reads the dynare-*.rdf files in the current directory, and then create a
# Reads the dynare-*.rdf files in the current directory, and then creates a
# wp.yml suitable for consumption by Jekyll
declare -A wp_authors wp_title wp_year wp_url wp_data_url wp_source_url
......@@ -104,7 +104,7 @@ else
fi
for ((i = ${#wp_authors[@]}; i >= 1; i--)); do
if [[ -z ${wp_authors[$i]} ]] || [[ -z ${wp_title[$i]} ]] || [[ -z ${wp_year[$i]} ]] || [[ -z ${wp_url[$i]} ]]; then
if [[ -z ${wp_authors[$i]} || -z ${wp_title[$i]} || -z ${wp_year[$i]} || -z ${wp_url[$i]} ]]; then
echo "Some field is missing in working paper $i!" >&2
exit 1
fi
......
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