summaryrefslogtreecommitdiffstats
path: root/remote/modules/beamergui
diff options
context:
space:
mode:
authorManuel Schneider2014-04-08 13:00:11 +0200
committerManuel Schneider2014-04-08 13:00:11 +0200
commit67b84fc9cabff160248afad49190fee5a7436f8e (patch)
treebb89ac662b5b9ba2a99a9779fa27fb1a908b5157 /remote/modules/beamergui
parent[beamergui] Removed configfile in beamergui-wrapper (diff)
downloadtm-scripts-67b84fc9cabff160248afad49190fee5a7436f8e.tar.gz
tm-scripts-67b84fc9cabff160248afad49190fee5a7436f8e.tar.xz
tm-scripts-67b84fc9cabff160248afad49190fee5a7436f8e.zip
[beamergui] Dont use egrep anymore.
Diffstat (limited to 'remote/modules/beamergui')
-rwxr-xr-xremote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter13
1 files changed, 6 insertions, 7 deletions
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 "<width>x<height>"
@@ -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. "