1 Star 0 Fork 0

tonycoming/calamari

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
get-flavor.sh 643 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
ID=$(lsb_release -i -s)
if [ $? != 0 ] ; then echo "$0: lsb_release failed..."; exit 1; fi
VERSION=$(lsb_release -r -s)
# ID is:
# Centos6.4: CentOS
# RHEL6: RedHatEnterpriseServer
# precise, trusty: Ubuntu
# wheezy: Debian
# SLES: SUSE Linux
# openSUSE: openSUSE project
case $ID in
"CentOS"|"RedHatEnterpriseServer")
case $VERSION in
7.*) ret="rhel7" ;;
6.*) ret="el6" ;;
*) echo "$0: unhandled EL version $VERSION"; exit 1 ;;
esac ;;
"Ubuntu"|"Debian") ret="debian" ;;
*SUSE*) ret="suse" ;;
*) echo "$0: unhandled id $ID"; exit 1 ;;
esac
echo $ret
exit 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/tonycoming/calamari.git
git@gitee.com:tonycoming/calamari.git
tonycoming
calamari
calamari
master

搜索帮助