From 356404f22946a689914fa4541152ceb8de0b125f Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Tue, 2 Jun 2015 15:06:36 +0000 Subject: [PATCH] Follow symlink for elements This allow custom elements to be added with symlink. Without -follow a symlinked element is valid but scripts in *.d directory aren't used. Change-Id: If50b7d9c3b1f6fe278c28488146709efe5cf065f Closes-Bug: 1461124 --- lib/common-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common-functions b/lib/common-functions index 20768f30..3eb6e38f 100644 --- a/lib/common-functions +++ b/lib/common-functions @@ -79,10 +79,10 @@ function generate_hooks () { for _ELEMENT in $IMAGE_ELEMENT ; do for dir in ${ELEMENTS_PATH//:/ } ; do [ -d $dir/$_ELEMENT ] || continue - for _DIR in $(find $dir/$_ELEMENT -mindepth 1 -maxdepth 1 -type d -not -name tests); do + for _DIR in $(find $dir/$_ELEMENT -follow -mindepth 1 -maxdepth 1 -type d -not -name tests); do copy_hooks_not_overwrite $_DIR done - for _FILE in $(find $dir/$_ELEMENT -maxdepth 1 -type f); do + for _FILE in $(find $dir/$_ELEMENT -follow -maxdepth 1 -type f); do cp -t $TMP_HOOKS_PATH -a $_FILE done break