From bb91d83df776278f368a61ba7bc7ad64a5430723 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Tue, 12 Sep 2017 12:50:20 +0200 Subject: split library.sh --- batch.sh | 2 +- buildlib.sh | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ etc/library.sh | 201 +----------------------------------------------------- installer.sh | 3 +- 4 files changed, 213 insertions(+), 202 deletions(-) create mode 100644 buildlib.sh diff --git a/batch.sh b/batch.sh index 51503e1e..aa61bc66 100755 --- a/batch.sh +++ b/batch.sh @@ -8,7 +8,7 @@ # Usage: ./batch.sh # -source etc/library.sh # initializes $IMGNAME +source buildlib.sh # initializes $IMGNAME IP=$1 # First argument is the QEMU Raspbian IP address diff --git a/buildlib.sh b/buildlib.sh new file mode 100644 index 00000000..8fc484d3 --- /dev/null +++ b/buildlib.sh @@ -0,0 +1,209 @@ +#!/bin/bash + +# Library to install software on Raspbian ARM through QEMU +# +# Copyleft 2017 by Ignacio Nunez Hernanz +# GPL licensed (see end of file) * Use at your own risk! +# +# More at ownyourbits.com +# + +IMGNAME=$( basename "$IMGFILE" .img )_$( basename "$INSTALL_SCRIPT" .sh ).img +DBG=x + +# $IMGOUT will contain the name of the last step +function launch_install_qemu() +{ + local IMG=$1 + local IP=$2 + [[ "$IP" == "" ]] && { echo "usage: launch_install_qemu