am 6a36e75d: am f8c154f4: Merge "getsdcardpath, getscreenshotpath, getlastscreenshot" into jb-mr1-dev
* commit '6a36e75d63869f8adcd72c43364318118c3715f5': getsdcardpath, getscreenshotpath, getlastscreenshot
This commit is contained in:
commit
0d4c0642ec
22
envsetup.sh
22
envsetup.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue