Files
codeql/rust/tools/index.sh
2024-08-30 13:05:46 +02:00

18 lines
408 B
Bash
Executable File

#!/bin/bash
# TODO move this to rust code
inputs=($(find -name Cargo.toml))
if [ "${#inputs}" -eq 0 ]; then
inputs=($(find -name rust-project.json))
if [ "${#inputs}" -eq 0 ]; then
inputs=($(find -name '*.rs'))
if [ "${#inputs}" -eq 0 ]; then
echo "no source files found" >&2
exit 1
fi
fi
fi
exec "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" "${inputs[@]}"