Ubuntu Pastebin

Paste from ogra at Tue, 8 Mar 2016 13:18:57 +0000

Download as text
 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
37
38
39
40
41
42
43
44
45
46
47
48
49
=== modified file 'live-build/auto/build'
--- live-build/auto/build	2016-03-04 08:49:27 +0000
+++ live-build/auto/build	2016-03-08 13:18:54 +0000
@@ -319,6 +319,45 @@
 	cp -a binary-tar.tar.gz "$PREFIX.rootfs.tar.gz"
 fi
 
+if [ "$PROJECT:$SUBPROJECT" = "ubuntu-core:system-image" ]; then
+    if [ -e "binary/$INITFS/filesystem.dir" ]; then
+
+        cd "binary/$INITFS/filesystem.dir/"
+
+        for dir in lib/modules lib/firmware writable gadget meta; do
+            mkdir -p $dir
+        done
+
+        VERSION="$(lsb_release -r -s)-$(date +20%y%m%d-%H:%M)"
+
+        # for backwards compatibility
+        cat > meta/package.yaml <<EOF
+name: ubuntu-core
+version: $VERSION
+architecture: $ARCH
+vendor: Canonical
+type: os
+EOF
+        cat > meta/readme.md <<EOF
+The ubuntu-core OS snap
+EOF
+
+        cat > meta/snap.yaml <<EOF
+name: ubuntu-core
+version: $VERSION
+summary: The ubuntu-core OS snap
+architectures: [$ARCH]
+type: os
+EOF
+
+    cd ..
+
+    apt-get install ubuntu-snappy-cli
+    snappy build --squashfs filesystem.dir
+
+    fi
+fi
+
 if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then
 	(cd "binary/$INITFS/custom.dir/" && tar -c *) | \
 		gzip -9 --rsyncable > "$PREFIX.custom.tar.gz"
Download as text