From 895d950b5e6c7c5b53ce6cc17522374362b9c999 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Mon, 7 Dec 2015 17:07:10 +0300 Subject: [PATCH] Script parameters handling --- main.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.sh b/main.sh index f256145cd2..0c694fb385 100644 --- a/main.sh +++ b/main.sh @@ -13,6 +13,16 @@ # # + # Script parameters handling + for i in "$@"; do + if [[ "$i" == *"="* ]]; then + parameter=${i%%=*} + value=${i##*=} + echo "[info] Command line: setting $parameter to ${value:-(empty)}" + eval $parameter=$value + fi + done + # We'll use this tittle on all menus backtitle="Armbian building script, http://www.armbian.com | Author: Igor Pecovnik" mkdir -p $DEST/debug $SRC/userpatches/kernel $SRC/userpatches/u-boot