Commit 8f822c93 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #334 from konimex/subsystem

Initial support for Windows 10 Linux subsystem
parents e79b4d99 3dff1947
...@@ -118,7 +118,16 @@ getdistro() { ...@@ -118,7 +118,16 @@ getdistro() {
case "$os" in case "$os" in
"Linux" ) "Linux" )
if type -p lsb_release >/dev/null 2>&1; then if grep -q 'Microsoft' /proc/version >/dev/null 2>&1 || \
grep -q 'Microsoft' /proc/sys/kernel/osrelease >/dev/null 2>&1; then
case "$distro_shorthand" in
"on") distro="$(lsb_release -sir 2>/dev/null) [Windows 10]" ;;
"tiny") distro="Windows 10" ;;
*) distro="$(lsb_release -sd 2>/dev/null) on Windows 10" ;;
esac
ascii_distro="windows10"
elif type -p lsb_release >/dev/null 2>&1; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on") distro="$(lsb_release -sir 2>/dev/null)" ;; "on") distro="$(lsb_release -sir 2>/dev/null)" ;;
"tiny") distro="$(lsb_release -si 2>/dev/null)" ;; "tiny") distro="$(lsb_release -si 2>/dev/null)" ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment