diff options
-rwxr-xr-x | bin/impressive-display | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/impressive-display b/bin/impressive-display index e215ec8..bb890d7 100755 --- a/bin/impressive-display +++ b/bin/impressive-display @@ -138,26 +138,23 @@ if [ -n "$FAKE_HOSTNAME" ]; then THIS_HOSTNAME="$FAKE_HOSTNAME" fi -echo "$THIS_HOSTNAME" -echo "${!DISPLAYS[@]}" -for display in "${!DISPLAYS[@]}"; do echo "$display - ${DISPLAYS[$display]}"; done -if echo ${!DISPLAYS[@]} | grep -q "$THIS_HOSTNAME"; then +if `echo ${!DISPLAYS[@]} | grep -q "$THIS_HOSTNAME"`; then $OUTPUT "INFO: $THIS_HOSTNAME has extra properties. loading it.." - if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep "pdf_uri="; then + if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep -q "pdf_uri="; then PDF_URI=`echo ${DISPLAYS[$THIS_HOSTNAME]} | sed -r -e 's/.*pdf_uri=([^|]*).*/\1/'` else PDF_URI="$DEFAULT_PDF_URI" fi - if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep "res="; then + if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep -q "res="; then RESOLUTION=`echo ${DISPLAYS[$THIS_HOSTNAME]} | sed -r -e 's/.*res=([^|]*).*/\1/'` else RESOLUTION="$DEFAULT_RESOLUTION" fi - if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep "creds="; then + if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep -q "creds="; then PDF_URL_CREDS=`echo ${DISPLAYS[$THIS_HOSTNAME]} | sed -r -e 's/.*creds=([^|]*).*/\1/'` else PDF_URL_CREDS="$DEFAULT_PDF_URL_CREDS" |