mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix zeek-wrapper
The script was not passing command-line arguments to the new program. Also improved some error messages.
This commit is contained in:
parent
89b8d6e7ba
commit
a87d1fd875
1 changed files with 7 additions and 2 deletions
|
@ -17,11 +17,16 @@ base=$(dirname $0)
|
|||
old=$(basename $0)
|
||||
new=$(echo "${old}" | sed 's/^bro/zeek/')
|
||||
|
||||
if [ ! -x "${base}/${new}" ]; then
|
||||
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 && test -z "${ZEEK_IS_BRO}" && deprecated "${old}" "${new}"
|
||||
|
||||
test "${new}" != "${old}" && "${base}/${new}"
|
||||
"${base}/${new}" "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue