echo-e"\n############################################################\n### end $ci\n############################################################">>"$NGINX_CONFIG_COPY.$DATE_EXT"
PREVIOUS_CI_LINE="$CI_LINE"
done
#debug "pre-cat waiting..."
#read
cat$NGINX_CONFIG_COPY.*>"$NGINX_CONFIG_COPY"
rm$NGINX_CONFIG_COPY.*
#debug "post-rm waiting..."
#read
done
IFS="$OLDIFS"
# get back to the original directory we've been running from
#
cd"$ORIG_CWD"
# flatten an nginx config file,
# including all includes inline, recursively
#
# $NGINX_CONFIG - nginx config file to work off of
# $OUTPUT_DEST - where to output the assembled, flattened file (must not exist)
echo-e"\n############################################################\n### end $ci\n############################################################">>"$NGINX_CONFIG_COPY.$DATE_EXT"
PREVIOUS_CI_LINE="$CI_LINE"
done
#debug "pre-cat waiting..."
#read
cat$NGINX_CONFIG_COPY.*>"$NGINX_CONFIG_COPY"
rm$NGINX_CONFIG_COPY.*
#debug "post-rm waiting..."
#read
done
IFS="$OLDIFS"
# check how we need to output the thing
if["$2"!=""];then
debug "+-- moving the temporary output file to the output destination"
debug "+-- moving the temporary output file to the output destination"
debug " src: $NGINX_CONFIG_COPY"
debug " src: $NGINX_CONFIG_COPY"
debug " dst: $2"
debug " dst: $OUTPUT_DEST"
mv"$NGINX_CONFIG_COPY""$(basename$2)"
mv"$NGINX_CONFIG_COPY""$OUTPUT_DEST"
debug "+-- cleaning up the temporary output directory"
debug "+-- cleaning up the temporary output directory"