diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 3bfca8b..0a0502a 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -59,7 +59,7 @@ jobs: id: find-executable-files working-directory: ${{github.workspace}} run: | - chmod +x ./CIUtils/find-executable.sh + find ./CIUtils/ -name "*.sh" -exec chmod +x {} \; EXEC_FILES=$(./CIUtils/find-executable.sh "workspace/") echo "Found executable and dynamic library files: $EXEC_FILES" echo "exec_files=$EXEC_FILES" >> $GITHUB_OUTPUT diff --git a/CIUtils/find-executable.sh b/CIUtils/find-executable.sh index e6ddb4c..ff62f04 100644 --- a/CIUtils/find-executable.sh +++ b/CIUtils/find-executable.sh @@ -1,15 +1,18 @@ #!/bin/bash +# Get the directory of the current script +script_dir=$(dirname "$0") + # Detect the operating system os_type=$(uname) # Execute the corresponding script based on the operating system case "$os_type" in Linux) - echo $(./find-elf.sh "$1") + echo $("$script_dir/find-elf.sh" "$1") ;; Darwin) - echo $(./find-macho.sh "$1") + echo $("$script_dir/find-macho.sh" "$1") ;; *) echo "Unsupported OS: $os_type"