blob: cccdf18fa3e64868930c8cc240d1336cde7f71a2 (
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
|
#!/bin/bash
# Batch creation of NextCloudPi 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>
#
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=""\
NO_APT_CACHER=no
# pack image
IMGNAME="NextCloudPi_$( date "+%m-%d-%y" )_OdroidHC1"
IMGFILE="$( ls -1t armbian/output/images/*.img | head -1 )"
pack_image "$IMGFILE" "$IMGNAME.img"
# testing
# TODO
# uploading
# TODO
|