Screenshot
#!/bin/sh

directory=~/screenshots
if [ ! -d "$directory" ]; then
    mkdir $directory
fi

timestamp=$(date +%Y-%m-%d_%H-%M-%S)
fileName=$timestamp"_screenshot.png"

git pull
cordova run

echo "Sleeping for 20 sec (waiting for app to load properly)"
sleep 20

adb shell screencap -p /sdcard/$fileName
adb pull /sdcard/$fileName ~/screenshots
adb shell rm /sdcard/$fileName

#alternativa pro použití bez sdkarty (Linux & OS X)
#    adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/screenshots/$fileName
Není-li uvedeno jinak, obsah této stránky je pod licencí Creative Commons Attribution-ShareAlike 3.0 License