]> piware.de Git - bin.git/commitdiff
add phablet-install
authorMartin Pitt <martin@piware.de>
Tue, 15 Oct 2013 16:25:46 +0000 (18:25 +0200)
committerMartin Pitt <martin@piware.de>
Tue, 15 Oct 2013 16:25:46 +0000 (18:25 +0200)
phablet-install [new file with mode: 0755]
postinst-setup

diff --git a/phablet-install b/phablet-install
new file mode 100755 (executable)
index 0000000..3cfccda
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+CHANNEL=devel-proposed
+MYNAME=$(getent passwd `whoami` | cut -f5 -d: | cut -f1 -d,)
+MYMAIL=${DEBMEMAIL:-$EMAIL}
+
+# flash the latest image
+phablet-flash ubuntu-system --no-backup --channel $CHANNEL
+
+# make image writable
+adb shell "touch /userdata/.writable_image"
+# configure timezone
+adb shell "timedatectl set-timezone `cat /etc/timezone`"
+
+echo "rebooting to activate writable image..."
+adb reboot
+adb wait-for-device
+
+# install some necessary packages
+echo "connect to wifi now and press Enter"
+read n
+adb shell "apt-get install -y vim bzr ubuntu-ui-toolkit-autopilot ofono-phonesim"
+
+# set up bzr, vim, ssh
+adb shell "su -c 'mkdir ~/.ssh' phablet"
+adb push ~/.ssh/id_rsa.pub /home/phablet/.ssh/authorized_keys
+adb shell "chmod 600 /home/phablet/.ssh/authorized_keys"
+if [ -e ~/.vimrc ]; then
+    adb push ~/.vimrc /home/phablet/.vimrc
+    adb shell "echo 'set bg=light' >> /home/phablet/.vimrc"
+fi
+adb shell "chown -R phablet:phablet /home/phablet"
+
+# start ssh
+adb shell "start ssh"
+adb forward tcp:22000 tcp:22
index 2d44ad94d858d3ef30d65548f693cd5046b01759..5b26de57e524893caae0d98194a51c41383b1b74 100755 (executable)
@@ -43,7 +43,7 @@ apt-get purge -y --auto-remove hplip hplip-data printer-driver-hpcups brltty blu
 killall apt-get || true
 apt-get update
 
-DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog libtool devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts wdiff ccache listadmin quilt mutt editmoin lintian ubuntu-dev-tools dput easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm qemu-utils bzr-buildpackage git build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet debootstrap wmctrl mumble libnotify-bin svn-buildpackage pastebinit lptools openvpn pdfjam sbuild schroot exiv2 android-tools-adb phablet-tools gstreamer1.0-plugins-ugly flashplugin-installer valgrind
+DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog libtool devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts wdiff ccache listadmin quilt mutt editmoin lintian ubuntu-dev-tools dput easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm qemu-utils bzr-buildpackage git build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet debootstrap wmctrl mumble libnotify-bin svn-buildpackage pastebinit lptools openvpn pdfjam sbuild schroot exiv2 android-tools-adb phablet-tools gstreamer1.0-plugins-ugly flashplugin-installer valgrind calibre
 
 apt-get -y --no-install-recommends build-dep postgresql-9.1 apport calibre gvfs udisks2 upower gnome-disk-utility systemd pygobject umockdev