Added windows version detection

This commit is contained in:
dylan araps 2016-01-05 18:14:04 +11:00
parent 14a6b486ad
commit c09d2aecb0
1 changed files with 25 additions and 1 deletions

View File

@ -250,8 +250,32 @@ getdistro () {
;; ;;
"Windows") "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" distro="Windows"
;; ;;
esac
;;
*) *)
distro="Unknown" distro="Unknown"