in Linux build script check for missing files

This commit is contained in:
otavepto 2023-12-25 22:27:06 +02:00
parent 71f1097544
commit 7447949cf0

View File

@ -316,7 +316,10 @@ function build_for () {
local build_cmds=()
local -A objs_dirs=()
for src_file in $( echo "${all_src[@]}" ); do
[[ -f "$src_file" ]] || continue
[[ -f "$src_file" ]] || {
echo "[X] file "$src_file" wasn't found" >&2;
return 1;
}
# https://stackoverflow.com/a/9559024
local obj_dir=$( [[ -d "${src_file%/*}" ]] && echo "${src_file%/*}" || echo '.' )