~vila/ubuntu-test-cases/retry-apt-get-update

« back to all changes in this revision

Viewing changes to utils/host/reboot-and-unlock.sh

  • Committer: Leo Arias
  • Date: 2014-11-10 19:28:56 UTC
  • mfrom: (345 touch)
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: leo.arias@canonical.com-20141110192856-rgpksx9n9j0b39yl
Merged with the touch branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
set -e
 
3
 
 
4
basedir=$(dirname $(readlink -f $0))
 
5
 
 
6
if ! adb-shell dpkg -s unity8-autopilot 2>/dev/null >/dev/null ; then
 
7
        echo "Installing unity8-autopilot as a pre-req for unlocking screen"
 
8
        adb shell sudo apt-get install -yq --force-yes unity8-autopilot
 
9
fi
 
10
 
 
11
adb pull /usr/share/unity8/unlock-device "${basedir}"
 
12
chmod +x "${basedir}/unlock-device"
 
13
 
 
14
# unlock-device will reboot for us
 
15
exec "${basedir}/unlock-device" -w $basedir/../../scripts/reboot-and-wait