1 Star 0 Fork 0

小熊2021/zeek

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
zeek-wrapper.in 708 Bytes
一键复制 编辑 原始数据 按行查看 历史
#! /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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bear-2021/zeek.git
git@gitee.com:bear-2021/zeek.git
bear-2021
zeek
zeek
master

搜索帮助