提交 a9da5197 作者: Juan Batiz-Benet

test/countineyn terminal and error code

上级 dc9f1c45
......@@ -2,9 +2,12 @@
# Author: Juan Batiz-Benet <juan@benet.ai>
# MIT LICENSED
# if not a terminal, exit 0 (yes!)
test -t 1 || exit 0
read -p "continue? [y/N] "
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [[ $REPLY =~ ^[Yy] ]]; then
exit 0
fi
exit -1
exit 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论