Skip to content

Commit

Permalink
tools/dev-setup.sh: Add support to call individual function from the …
Browse files Browse the repository at this point in the history
…dev setup script.

Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com>
  • Loading branch information
ramya-subramanyam committed Oct 1, 2024
1 parent 460559c commit 2884e3d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tools/dev-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,15 @@ function core_api_setup {
ln -sf ${core_api_submodule_dir}/api ${cores_psoc_dir}
}

git_submodule_setup
core_api_setup
# Check if a function name is passed as an argument
if [ $# -gt 0 ]; then
if declare -f "$1" > /dev/null; then
"$1"
else
echo "Function $1 not found"
exit 1
fi
else
git_submodule_setup
core_api_setup
fi

0 comments on commit 2884e3d

Please sign in to comment.