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>2017-06-12 23:52:14 +0300
committernachoparker <nacho@ownyourbits.com>2017-06-12 23:55:15 +0300
commit2a90a83ad2fd28277f678ef530aed44dc3344deb (patch)
tree6da7c243224df7dd2d97a57872a087aef76e547f /etc/library.sh
parent1357ed7240f47abbdce45c4fbd6673b2669afa3a (diff)
QEMU docker ARM environment
Diffstat (limited to 'etc/library.sh')
-rwxr-xr-xetc/library.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/library.sh b/etc/library.sh
index 5cfd1cba..fc6f1141 100755
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -257,6 +257,24 @@ function copy_to_image()
rmdir tmpmnt &>/dev/null
}
+function download_resize_raspbian_img()
+{
+ local SIZE=$1
+ local IMGFILE=$2
+ local IMG=raspbian_lite_latest
+
+ test -f $IMGFILE && \
+ echo -e "INFO: $IMGFILE already exists. Skipping download ..." && return 0
+
+ test -f $IMG.zip || \
+ wget https://downloads.raspberrypi.org/$IMG -O $IMG.zip || return 1
+
+ unzip -o $IMG.zip && \
+ mv *-raspbian-*.img $IMGFILE && \
+ qemu-img resize -f raw $IMGFILE +$SIZE && \
+ return 0
+}
+
function pack_image()
{
local IMGOUT="$1"