Missed a set of parentheses in the pushed version

I tested the code under cygwin with one monitor, and found that even that produced wrong output (and a test with some faked monitors confirmed the output given in the issue). The error was me omitting the parentheses that signify an array in bash. With them there it should work as intended.
This commit is contained in:
Anton Älgmyr
2014-05-01 03:49:39 +02:00
parent 4ddd9287ad
commit ecfbb4695e

View File

@@ -1069,8 +1069,8 @@ detectres () {
xResolution=$(echo $xResolution | tr "\\n" "," | sed 's/\(.*\),/\1/')
fi
elif [[ "${distro}" == "Cygwin" ]]; then
width=$(wmic desktopmonitor get screenwidth | grep -vE '[a-z]+' | tr '\r\n' ' ')
height=$(wmic desktopmonitor get screenheight | grep -vE '[a-z]+' | tr '\r\n' ' ')
width=($(wmic desktopmonitor get screenwidth | grep -vE '[a-z]+' | tr '\r\n' ' '))
height=($(wmic desktopmonitor get screenheight | grep -vE '[a-z]+' | tr '\r\n' ' '))
xResolution=""
len=${#width[@]}