mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-28 17:02:24 +00:00
Added script to warn a user about issues regarding wrong umask and CPack
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -200,6 +200,14 @@ add_executable(nDPId nDPId.c ${NDPID_PFRING_SRCS} nio.c utils.c)
|
||||
add_executable(nDPIsrvd nDPIsrvd.c nio.c utils.c)
|
||||
add_executable(nDPId-test nDPId-test.c ${NDPID_PFRING_SRCS})
|
||||
|
||||
add_custom_target(umask_check)
|
||||
add_custom_command(
|
||||
TARGET umask_check
|
||||
PRE_BUILD
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/scripts/umask-check.sh
|
||||
)
|
||||
add_dependencies(nDPId umask_check)
|
||||
|
||||
add_custom_target(dist)
|
||||
add_custom_command(
|
||||
TARGET dist
|
||||
|
||||
14
scripts/umask-check.sh
Executable file
14
scripts/umask-check.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
UMASK=$(umask)
|
||||
|
||||
if [ "${UMASK}" != "0002" -a "${UMASK}" != "0022" ]; then
|
||||
cat <<EOF
|
||||
********************************************
|
||||
* WARNING: 'cpack -G DEB' / 'cpack -G RPM' *
|
||||
* might not work correctly due to umask, *
|
||||
* which is set to ${UMASK} *
|
||||
* but expected is either 0002 or 0022 *
|
||||
********************************************
|
||||
EOF
|
||||
fi
|
||||
Reference in New Issue
Block a user