Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 20a5e7a
Author: Marcin Jeleński <[email protected]>
Date:   Wed Jun 21 19:04:32 2017 +0200

    Add port forward script

commit 3a5e7a6
Author: Marcin Jeleński <[email protected]>
Date:   Tue Jun 20 22:30:26 2017 +0200

    Regex fallback mode
  • Loading branch information
sorccu committed Apr 17, 2018
1 parent 1195033 commit 265b49e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ fi
args=
if [ "$1" = "autosize" ]; then
set +o pipefail
size=$(adb shell dumpsys window | grep -Eo 'init=\d+x\d+' | head -1 | cut -d= -f 2)
size=$(adb shell dumpsys window | grep -Eo 'init=[0-9]+x[0-9]+' | head -1 | cut -d= -f 2)
if [ "$size" = "" ]; then
w=$(adb shell dumpsys window | grep -Eo 'DisplayWidth=\d+' | head -1 | cut -d= -f 2)
h=$(adb shell dumpsys window | grep -Eo 'DisplayHeight=\d+' | head -1 | cut -d= -f 2)
w=$(adb shell dumpsys window | grep -Eo 'DisplayWidth=[0-9]+' | head -1 | cut -d= -f 2)
h=$(adb shell dumpsys window | grep -Eo 'DisplayHeight=[0-9]+' | head -1 | cut -d= -f 2)
size="${w}x${h}"
fi
args="-P $size@$size/0"
Expand Down

0 comments on commit 265b49e

Please sign in to comment.