blob: 5956b1676a05da8b58513776ccb4bfc04281ca9d (
plain)
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
|
#!/bin/bash
# Batch creation of NextCloudPlus image for the Odroid HC1
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage: ./build-SD-odroid.sh <DHCP QEMU image IP>
#
IMG="NextCloudPi_OdroidHC2_$( date "+%m-%d-%y" ).img"
set -e
# get armbian
[[ -d armbian ]] || git clone https://github.com/armbian/build armbian
# get NCP modifications
mkdir -p armbian/userpatches
wget https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/armbian.sh \
-O armbian/userpatches/customize-image.sh
# generate image
armbian/compile.sh docker \
BOARD=odroidxu4\
BRANCH=next\
KERNEL_ONLY=no\
KERNEL_CONFIGURE=no\
RELEASE=stretch\
BUILD_DESKTOP=no\
CLEAN_LEVEL=""\
USE_CCACHE=yes\
NO_APT_CACHER=no
# pack image
TAR=output/"$( basename "$IMG" .img ).tar.bz2"
pack_image "$IMG" "$TAR"
# testing
# TODO
# uploading
create_torrent "$TAR"
upload_ftp "$( basename "$TAR" .tar.bz2 )"
|