From c09d2aecb09aace3bb2ea8206ab3e92b92e3851f Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 5 Jan 2016 18:14:04 +1100 Subject: [PATCH] Added windows version detection --- fetch.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/fetch.sh b/fetch.sh index 7524dff1..3bffbf07 100755 --- a/fetch.sh +++ b/fetch.sh @@ -250,7 +250,31 @@ getdistro () { ;; "Windows") - distro="Windows" + case "$(cmd /c ver)" in + *"XP"*) + distro="Windows XP" + ;; + + *"7"*) + distro="Windows 7" + ;; + + *"8.1"*) + distro="Windows 8.1" + ;; + + *"8"*) + distro="Windows 8" + ;; + + *"10"*) + distro="Windows 10" + ;; + + *) + distro="Windows" + ;; + esac ;; *)