Shellcheck screen size

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-01-01 06:32:49 -08:00
parent d080e5d7a8
commit fa055481a7
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -36,8 +36,8 @@ QUERY_LOGGING=true
# Find the rows and columns will default to 80x24 is it can not be detected
screen_size=$(stty size 2>/dev/null || echo 24 80)
rows=$(echo $screen_size | awk '{print $1}')
columns=$(echo $screen_size | awk '{print $2}')
rows=$(echo "${screen_size}" | awk '{print $1}')
columns=$(echo "${screen_size}" | awk '{print $2}')
# Divide by two so the dialogs take up half of the screen, which looks nice.
r=$(( rows / 2 ))