diff options
-rw-r--r-- | armbian.sh | 1 | ||||
-rwxr-xr-x | build-SD-rpi.sh | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -10,6 +10,7 @@ # More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ # +set -e RELEASE=$1 LINUXFAMILY=$2 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 |