From 6126001e5ac1592b9d6f83f633980c974069a561 Mon Sep 17 00:00:00 2001 From: Timerix Date: Sat, 26 Apr 2025 00:23:13 +0500 Subject: [PATCH] copy dependency's out files only if they are newer or don't exist --- functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index cd61979..425552b 100755 --- a/functions.sh +++ b/functions.sh @@ -90,10 +90,10 @@ function build_dependency { if [ "$PRESERVE_OUT_DIRECTORY_STRUCTURE" = true ] && [ "$file_dir" != '.' ]; then mkdir -p "$proj_root_dir/$OUTDIR/$file_dir" mkdir -p "$proj_root_dir/$OBJDIR/dynamic_libs/$file_dir" - cp -v "$file" "$proj_root_dir/$OUTDIR/$file" + cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/$file" ln -sfv "$real_file" "$proj_root_dir/$OBJDIR/dynamic_libs/$file" else - cp -v "$file" "$proj_root_dir/$OUTDIR/" + cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/" ln -sfv "$real_file" "$proj_root_dir/$OBJDIR/dynamic_libs/" fi done @@ -104,9 +104,9 @@ function build_dependency { if [ "$PRESERVE_OUT_DIRECTORY_STRUCTURE" = true ]; then file_dir=$(dirname $file) mkdir -p "$proj_root_dir/$OUTDIR/$file_dir" - cp -v "$file" "$proj_root_dir/$OUTDIR/$file" + cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/$file" else - cp -v "$file" "$proj_root_dir/$OUTDIR/" + cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/" fi done fi