am 6a36e75d: am f8c154f4: Merge "getsdcardpath, getscreenshotpath, getlastscreenshot" into jb-mr1-dev

* commit '6a36e75d63869f8adcd72c43364318118c3715f5':
  getsdcardpath, getscreenshotpath, getlastscreenshot
This commit is contained in:
Victoria Lease 2012-08-23 12:01:25 -07:00 committed by Android Git Automerger
commit 0d4c0642ec
1 changed files with 22 additions and 0 deletions

View File

@ -992,6 +992,28 @@ function getbugreports()
done
}
function getsdcardpath()
{
adb ${adbOptions} shell echo -n \$\{EXTERNAL_STORAGE\}
}
function getscreenshotpath()
{
echo "$(getsdcardpath)/Pictures/Screenshots"
}
function getlastscreenshot()
{
local screenshot_path=$(getscreenshotpath)
local screenshot=`adb ${adbOptions} ls ${screenshot_path} | grep Screenshot_[0-9-]*.*\.png | sort -rk 3 | cut -d " " -f 4 | head -n 1`
if [ "$screenshot" = "" ]; then
echo "No screenshots found."
return
fi
echo "${screenshot}"
adb ${adbOptions} pull ${screenshot_path}/${screenshot}
}
function startviewserver()
{
local port=4939