Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2019-01-14 01:42:26 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-14 03:26:45 +0300
commitc4b4765d8a44f2322fefca57020b375466e79d9e (patch)
tree70f826f1f330d1af093af762690ff0d94ecaf4f6 /build-SD-rpi.sh
parent61e3ff31b530f0e1c05960da212d7241c26bdd2a (diff)
build: fix raspbian build, fail at any error
Diffstat (limited to 'build-SD-rpi.sh')
-rwxr-xr-xbuild-SD-rpi.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/build-SD-rpi.sh b/build-SD-rpi.sh
index 03d0d0ce..1f8c5a5b 100755
--- a/build-SD-rpi.sh
+++ b/build-SD-rpi.sh
@@ -17,6 +17,8 @@ IMG="NextCloudPi_RPi_$( date "+%m-%d-%y" ).img"
##############################################################################
+pgrep -f qemu-arm-static &>/dev/null && { echo "qemu-arm-static already running. Abort"; exit 1; }
+
## preparations
IMG=tmp/"$IMG"
@@ -35,10 +37,12 @@ echo -e "\e[1m\n[ Build NCP ]\e[0m"
prepare_chroot_raspbian "$IMG"
mkdir raspbian_root/tmp/ncp-build
-cp -r *.sh etc bin ncp-web raspbian_root/tmp/ncp-build
+rsync -Aax --exclude-from .gitignore --exclude *.img --exclude *.bz2 . raspbian_root/tmp/ncp-build
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
sudo chroot raspbian_root /bin/bash <<'EOFCHROOT'
+ set -e
+
# mark the image as an image build
touch /.ncp-image