Further reduce the size of wmic commands

This commit is contained in:
Dylan 2016-02-01 08:31:22 +11:00
parent 70e88727b6
commit 40366cb55b
1 changed files with 3 additions and 4 deletions

7
fetch
View File

@ -402,8 +402,7 @@ case "$os" in
"Windows") "Windows")
distro="$(wmic os get Caption /value)" distro="$(wmic os get Caption /value)"
distro=${distro/Caption} distro=${distro/Caption'='}
distro=${distro/'='}
distro=${distro//[[:space:]]/ } distro=${distro//[[:space:]]/ }
distro=${distro// } distro=${distro// }
distro=${distro/Microsoft } distro=${distro/Microsoft }
@ -900,8 +899,8 @@ getgpu () {
"Windows") "Windows")
gpu=$(wmic path Win32_VideoController get caption) gpu=$(wmic path Win32_VideoController get caption /value)
gpu=${gpu/Caption } gpu=${gpu/Caption'='}
gpu=${gpu//[[:space:]]/ } gpu=${gpu//[[:space:]]/ }
gpu=${gpu// } gpu=${gpu// }
;; ;;