First commit
This commit is contained in:
29
build_baloo_wrappers.sh
Executable file
29
build_baloo_wrappers.sh
Executable 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
|
||||
Reference in New Issue
Block a user