fix(wrapper.sh): Drop the .sh extension
This commit is contained in:
parent
2c74cb06de
commit
b5a0da1457
@ -161,9 +161,10 @@ configure_file("${CMAKE_SOURCE_DIR}/include/config.hpp.cmake" "${CMAKE_SOURCE_DI
|
|||||||
install(TARGETS ${PROJECT_NAME}
|
install(TARGETS ${PROJECT_NAME}
|
||||||
DESTINATION "bin"
|
DESTINATION "bin"
|
||||||
COMPONENT "binaries")
|
COMPONENT "binaries")
|
||||||
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/lemonbuddy_wrapper.sh"
|
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/lemonbuddy_wrapper"
|
||||||
DESTINATION "bin"
|
DESTINATION "bin" COMPONENT "binaries")
|
||||||
COMPONENT "binaries")
|
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/lemonbuddy_terminate"
|
||||||
|
DESTINATION "bin" COMPONENT "binaries")
|
||||||
|
|
||||||
install(FILES "examples/config"
|
install(FILES "examples/config"
|
||||||
DESTINATION "share/examples/${PROJECT_NAME}"
|
DESTINATION "share/examples/${PROJECT_NAME}"
|
||||||
|
17
scripts/lemonbuddy_terminate
Executable file
17
scripts/lemonbuddy_terminate
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "$1" != "noconfirm" ]]; then
|
||||||
|
read -p "Send SIGKILL to terminate processes? [Y/n] " -r choice
|
||||||
|
|
||||||
|
[[ "${choice^^}" == "Y" ]] || {
|
||||||
|
echo "Aborting..."; exit
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
pgrep -f "(lemonbuddy_wrapper|^lemonb(uddy|ar))" | xargs kill -9 >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo "Kill signals successfully sent"
|
||||||
|
else
|
||||||
|
echo "Failed to send kill signal ($?)"
|
||||||
|
fi
|
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
read -p "Send SIGKILL to terminate processes? [Y/n] " -r choice
|
|
||||||
|
|
||||||
[[ "${choice^^}" == "Y" ]] || {
|
|
||||||
echo "Aborting..."
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
[[ "${choice^^}" == "Y" ]] && {
|
|
||||||
pgrep -f "(lemonbuddy_wrapper.sh|^lemonb(uddy|ar))" | xargs kill -9 >/dev/null 2>&1
|
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo "Kill signals successfully sent"
|
|
||||||
else
|
|
||||||
echo "Failed to send kill signal ($?)"
|
|
||||||
fi
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user