From 67b84fc9cabff160248afad49190fee5a7436f8e Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Tue, 8 Apr 2014 13:00:11 +0200 Subject: [beamergui] Dont use egrep anymore. --- .../data/opt/openslx/scripts/beamergui-mode_setter | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'remote/modules') diff --git a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter index c7469a4d..55474174 100755 --- a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter +++ b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter @@ -41,7 +41,7 @@ echo "$XRANDRV" declare -a OUTPUTNAMES while read line; do OUTPUTNAMES+=("$(echo "$line" | grep -o "^\S*" )") -done < <( echo "$XRANDR" | egrep ".*[[:digit:]]{1,}mm x [[:digit:]]{1,}mm" ) +done < <( echo "$XRANDR" | grep -E ".*[[:digit:]]{1,}mm x [[:digit:]]{1,}mm" ) echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" # The goal is to add more modelines to the X server. While this is done the @@ -51,8 +51,8 @@ echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" #Two outputs? if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then # Either of them a projector? - if ( echo "$XRANDR" | egrep "^${OUTPUTNAMES[0]}.*0mm x 0mm" > /dev/null \ - || echo "$XRANDR" | egrep "^${OUTPUTNAMES[1]}.*0mm x 0mm" > /dev/null ) + if ( echo "$XRANDR" | grep -E "^${OUTPUTNAMES[0]}.*0mm x 0mm" > /dev/null \ + || echo "$XRANDR" | grep -E "^${OUTPUTNAMES[1]}.*0mm x 0mm" > /dev/null ) then # Create all modes, so that X knows them by name "x" @@ -69,10 +69,9 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then done # Check which of the outputs is the beamer. - if [ -n "$(echo "$XRANDR" | egrep "^${OUTPUTNAMES[0]}.*0mm x 0mm")" ]; then - BEAMER=0; - else - BEAMER=1; + if [ -n "$(echo "$XRANDR" | grep -E "^${OUTPUTNAMES[0]}.*0mm x 0mm")" ] + then BEAMER=0; + else BEAMER=1; fi echo "${OUTPUTNAMES[$BEAMER]} is a beamer. " -- cgit v1.2.3-55-g7522