GH-2637: Re-remove the bro symlink wrapper

This commit is contained in:
Tim Wojtulewicz 2022-12-13 10:03:44 -07:00
parent 92e4c11914
commit dd6e4a65ee
3 changed files with 0 additions and 42 deletions

View file

@ -207,9 +207,6 @@ install(DIRECTORY DESTINATION ${ZEEK_SPOOL_DIR})
install(DIRECTORY DESTINATION ${ZEEK_LOG_DIR}) install(DIRECTORY DESTINATION ${ZEEK_LOG_DIR})
configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev) configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev)
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/zeek-wrapper.in"
"${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev.sh file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev.sh
"export ZEEKPATH=`${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev`\n" "export ZEEKPATH=`${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev`\n"
@ -795,8 +792,6 @@ if ( NOT MSVC )
# Install wrapper script for Bro-to-Zeek renaming. # Install wrapper script for Bro-to-Zeek renaming.
include(InstallShellScript) include(InstallShellScript)
include(InstallSymlink) include(InstallSymlink)
InstallShellScript("bin" "zeek-wrapper.in" "zeek-wrapper")
InstallSymlink("${CMAKE_INSTALL_PREFIX}/bin/zeek-wrapper" "${CMAKE_INSTALL_PREFIX}/bin/bro-config")
endif () endif ()
######################################################################## ########################################################################

View file

@ -583,12 +583,6 @@ if (NOT ZEEK_STANDALONE OR CONAN_EXPORTED)
install(TARGETS libzeek LIBRARY DESTINATION lib) install(TARGETS libzeek LIBRARY DESTINATION lib)
endif() endif()
if ( NOT WIN32 )
# Install wrapper script for Bro-to-Zeek renaming.
include(InstallSymlink)
InstallSymlink("${CMAKE_INSTALL_PREFIX}/bin/zeek-wrapper" "${CMAKE_INSTALL_PREFIX}/bin/bro")
endif ()
# Target to create all the autogenerated files. # Target to create all the autogenerated files.
add_custom_target(generate_outputs_stage1) add_custom_target(generate_outputs_stage1)
add_dependencies(generate_outputs_stage1 ${bro_ALL_GENERATED_OUTPUTS}) add_dependencies(generate_outputs_stage1 ${bro_ALL_GENERATED_OUTPUTS})

View file

@ -1,31 +0,0 @@
#! /usr/bin/env bash
#
# Wrapper to continue reporting usage of old names of executables.
# This will print an error to stderr if stdin/stdout/stderr
# are all connected to a tty. It will then abort with an error
# exit code.
function deprecated {
cat >&2 <<EOF
Error: Use of '$1' is no longer supported. Please use '$2' instead.
EOF
}
base=$(dirname $0)
old=$(basename $0)
new=$(echo "${old}" | sed 's/^bro/zeek/')
if [ "${new}" = "${old}" ]; then
echo "zeek-wrapper: this script is just a wrapper for old commands"
exit 1
fi
if [ ! -f "${base}/${new}" ]; then
echo "zeek-wrapper: ${new} not found"
exit 1
fi
test -t 0 && test -t 1 && test -t 2 && deprecated "${old}" "${new}"
exit 1