Ai
1 Star 0 Fork 2

BuildOpenSource/busybox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mim 545 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ron Yorston 提交于 2020-01-13 18:33 +08:00 . mim: run scripts from a specification file
#!/bin/sh
MIMFILE="Mimfile"
if [ $# -ge 2 ] && [ "$1" = "-f" ]
then
MIMFILE="$2"
shift 2
fi
exec <"$MIMFILE" || exit 1
{
INCASE=false
while read -r REPLY
do
case $REPLY in
*:)
if ! $INCASE
then
printf '[ $# -eq 0 ] && set -- "%s"
TARGET="$1"
shift
case "$TARGET" in
' "${REPLY%:}"
else
printf ';;\n'
fi
printf '%s)\n' "${REPLY%:}"
INCASE=true
;;
"") ;;
*) printf '%s\n' "${REPLY##[ ]}";;
esac
done
$INCASE && printf ';;\n'
printf '*)
echo "Unknown command $TARGET"
exit 1
;;
esac
'
} | sh -s "$@"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/build-open-source/busybox.git
git@gitee.com:build-open-source/busybox.git
build-open-source
busybox
busybox
master

搜索帮助