Skip to content

Commit

Permalink
tasks: accept symbolic links for local*.sh
Browse files Browse the repository at this point in the history
In some cases, it might be useful to use symbolic links for the
local*.sh files, e.g. to use one from another repository where the file
can be tracked and even shared.

Switching from -type to -xtype will do the trick: -xtype checks the type
of the file that -type does not check.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
  • Loading branch information
matttbe authored and FlorentRevest committed May 3, 2024
1 parent e85b4ba commit cc221a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ COMMAND=$1
: ${SCRIPT_DIR:=`dirname "${SCRIPT}"`}

# Let the user override environment variables for their special needs
files_to_source=$(find ${SCRIPT_DIR} -maxdepth 1 -type f -name "local*.sh")
files_to_source=$(find ${SCRIPT_DIR} -maxdepth 1 -xtype f -name "local*.sh")
for file in $files_to_source; do
source "$file"
done
Expand Down

0 comments on commit cc221a9

Please sign in to comment.