-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathremaster-ubuntu-touch
executable file
·36 lines (28 loc) · 1.13 KB
/
remaster-ubuntu-touch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Copyright Jonathan Riddell and Harald Sitter 2015, may be copied under GNU GPL v2 or later
# download ubuntu touch, upload it to the arm server, download remastered image from arm server
set -ex
__dir__=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OUTPUTIMG=vivid-preinstalled-touch-armhf.tar.gz
PROPOSEDDIR=$__dir__/remaster-proposed/daily-preinstalled/
SYNCDIR=$PROPOSEDDIR/tmp
IMGDIR=$PROPOSEDDIR/`date +%Y%m%d.%H%M%S`
rm -rf $SYNCDIR
mkdir -p $SYNCDIR
rm -rf $IMGDIR
mkdir -p $IMGDIR
echo "=== Running remote server harness `date`"
scp remote-remaster $SERVER:/root
scp chroot-remaster $SERVER:/root
ssh $SERVER bash /root/remote-remaster
echo "=== syncing tar `date`"
# Very simple rsync without compression (slows down things).
# Simply sync the file to a syncdir. Then copy the file from there to the
# target. This ensures that the target directory is kept pristine but we still
# can make use of partial syncing via rsync.
rsync -avP --stats $SERVER:/root/output/$OUTPUTIMG $SYNCDIR
cp $SYNCDIR/$OUTPUTIMG $IMGDIR
echo "=== running shasum `date`"
cd $IMGDIR
sha256sum $OUTPUTIMG > SHA256SUMS