First commit

This commit is contained in:
Ignacio Serantes
2026-03-22 18:13:22 +01:00
commit 3fb55ee4f3
19 changed files with 1928 additions and 0 deletions

29
build_baloo_wrappers.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/bash
OVERWRITE=0
while [ -n "$1" ]; do
case "$1" in
-o|--overwrite)
OVERWRITE=1
;;
esac
shift
done
MAIN_PATH="$PWD"
DEST_PATH="$MAIN_PATH/bagheera_search_lib"
LIB_NAME="libbaloo_wrapper.so"
WORK_PATH="$MAIN_PATH/baloo_wrapper"
FUNC_NAME1="execute_baloo_query"
FUNC_NAME2="get_file_properties"
if (( OVERWRITE )) || ! [ -f "$DEST_PATH/$LIB_NAME" ] && [ -d "$WORK_PATH" ]; then
BUILD_PATH="$WORK_PATH/build"
rm -Rf "$BUILD_PATH" && mkdir -p "$BUILD_PATH" && cd "$BUILD_PATH" && cmake .. && make && cp "$LIB_NAME" "$DEST_PATH"
ldd "$DEST_PATH/$LIB_NAME" | grep Baloo
nm -D "$DEST_PATH/$LIB_NAME" | grep "$FUNC_NAME1"
nm -D "$DEST_PATH/$LIB_NAME" | grep "$FUNC_NAME2"
fi