summaryrefslogtreecommitdiff
path: root/init-tools.sh
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 05:17:19 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 05:17:19 (GMT)
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /init-tools.sh
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh30
1 files changed, 13 insertions, 17 deletions
diff --git a/init-tools.sh b/init-tools.sh
index 9a83bda..f965583 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -18,45 +18,41 @@ __INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done
# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc
get_current_linux_name() {
# Detect Distro
- if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
- if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
+ if [ "$(cat /etc/os-release | grep -cim1 ubuntu)" -eq 1 ]; then
+ if [ "$(cat /etc/os-release | grep -cim1 16.04)" -eq 1 ]; then
echo "ubuntu.16.04"
return 0
fi
- if [ "$(cat /etc/*-release | grep -cim1 16.10)" -eq 1 ]; then
+ if [ "$(cat /etc/os-release | grep -cim1 16.10)" -eq 1 ]; then
echo "ubuntu.16.10"
return 0
fi
echo "ubuntu"
return 0
- elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
+ elif [ "$(cat /etc/os-release | grep -cim1 centos)" -eq 1 ]; then
echo "centos"
return 0
- elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
+ elif [ "$(cat /etc/os-release | grep -cim1 rhel)" -eq 1 ]; then
echo "rhel"
return 0
- elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
+ elif [ "$(cat /etc/os-release | grep -cim1 debian)" -eq 1 ]; then
echo "debian"
return 0
- elif [ "$(cat /etc/*-release | grep -cim1 alpine)" -eq 1 ]; then
+ elif [ "$(cat /etc/os-release | grep -cim1 alpine)" -eq 1 ]; then
echo "alpine"
return 0
- elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
- if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
- echo "fedora.23"
- return 0
- fi
- if [ "$(cat /etc/*-release | grep -cim1 24)" -eq 1 ]; then
+ elif [ "$(cat /etc/os-release | grep -cim1 fedora)" -eq 1 ]; then
+ if [ "$(cat /etc/os-release | grep -cim1 24)" -eq 1 ]; then
echo "fedora.24"
return 0
fi
- elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
- if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
- echo "opensuse.13.2"
+ if [ "$(cat /etc/os-release | grep -cim1 25)" -eq 1 ]; then
+ echo "fedora.25"
return 0
fi
- if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then
+ elif [ "$(cat /etc/os-release | grep -cim1 opensuse)" -eq 1 ]; then
+ if [ "$(cat /etc/os-release | grep -cim1 42.1)" -eq 1 ]; then
echo "opensuse.42.1"
return 0
fi