diff options
author | Adrian Kummerlaender | 2016-02-19 19:14:45 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2016-02-19 19:14:45 +0100 |
commit | e71905763d0c1856fe245a4c27be9fc694cd92ee (patch) | |
tree | ef85815edcb27b7003d0b4fd284aa49ae56e828d | |
parent | 5021c97e31ef8bb7cf40471e3fa98b451097451b (diff) | |
download | change-e71905763d0c1856fe245a4c27be9fc694cd92ee.tar change-e71905763d0c1856fe245a4c27be9fc694cd92ee.tar.gz change-e71905763d0c1856fe245a4c27be9fc694cd92ee.tar.bz2 change-e71905763d0c1856fe245a4c27be9fc694cd92ee.tar.lz change-e71905763d0c1856fe245a4c27be9fc694cd92ee.tar.xz change-e71905763d0c1856fe245a4c27be9fc694cd92ee.tar.zst change-e71905763d0c1856fe245a4c27be9fc694cd92ee.zip |
Add support for global application specific filter definitions
i.e. `change` now tries to read a filter definition file matching the current process' name from `/usr/local/share/libChangeLog/filter`.
-rw-r--r-- | CMakeLists.txt | 47 | ||||
-rwxr-xr-x | change | 4 |
2 files changed, 37 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a7cfb5f..f92c549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,31 +13,52 @@ include_directories( add_library( ChangeLog SHARED - src/main.cc - src/bootstrap.cc - src/init/alloc.cc - src/utility/io.cc - src/utility/logger.cc - src/tracking/path_matcher.cc - src/tracking/change_tracker.cc + src/main.cc + src/bootstrap.cc + src/init/alloc.cc + src/utility/io.cc + src/utility/logger.cc + src/tracking/path_matcher.cc + src/tracking/change_tracker.cc ) target_link_libraries( ChangeLog - boost_system - boost_filesystem + boost_system + boost_filesystem ) install( PROGRAMS - change + change DESTINATION - bin + bin ) install( TARGETS - ChangeLog + ChangeLog LIBRARY DESTINATION - lib + lib +) + +install( + DIRECTORY DESTINATION + share/libChangeLog + DIRECTORY_PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE +) + +install( + DIRECTORY + src/filter + DESTINATION + share/libChangeLog + FILE_PERMISSIONS + OWNER_READ OWNER_WRITE + GROUP_READ WORLD_READ + PATTERN + "filter/*.filter" ) @@ -1,7 +1,9 @@ #!/usr/bin/bash +readonly FILTER_PATH="/usr/local/share/libChangeLog/filter" + export CHANGE_LOG_TARGET="/tmp/$(basename $0).$$.tmp" -export CHANGE_LOG_IGNORE_PATTERN_PATH=".change_log_ignore" +export CHANGE_LOG_IGNORE_PATTERN_PATH="$FILTER_PATH/$(basename $1).filter" LD_PRELOAD=libChangeLog.so eval "$@" |