mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Support eval bash statement in ./compile.sh (#1616)
Currently, invoking compile.sh will run its mono task of building all the
components into a final image.
In some situation, especially when developing with Kernel or U-Boot, it is
handy to run a portion of that great task like:
export BOARD=firefly-rk3399
export BRANCH=dev
# more to avoid the popup of dialog
./compile.sh 'fetch_from_repo "$BOOTSOURCE" "$BOOTDIR" "$BOOTBRANCH" "yes"'
./compile.sh 'compile_uboot'
or use a profile to keep things simple:
./compile.sh default BRANCH=dev 'compile_uboot'
This commit is contained in:
14
compile.sh
14
compile.sh
@@ -169,6 +169,7 @@ fi
|
||||
|
||||
if [[ -z "$CONFIG" && -n "$1" && -f "${SRC}/userpatches/config-$1.conf" ]]; then
|
||||
CONFIG="userpatches/config-$1.conf"
|
||||
shift
|
||||
fi
|
||||
|
||||
# usind default if custom not found
|
||||
@@ -195,13 +196,12 @@ popd > /dev/null
|
||||
[[ -z "${USERPATCHES_PATH}" ]] && USERPATCHES_PATH="$CONFIG_PATH"
|
||||
|
||||
# Script parameters handling
|
||||
for i in "$@"; do
|
||||
if [[ $i == *=* ]]; then
|
||||
parameter=${i%%=*}
|
||||
value=${i##*=}
|
||||
display_alert "Command line: setting $parameter to" "${value:-(empty)}" "info"
|
||||
eval "$parameter=\"$value\""
|
||||
fi
|
||||
while [[ $1 == *=* ]]; do
|
||||
parameter=${1%%=*}
|
||||
value=${1##*=}
|
||||
shift
|
||||
display_alert "Command line: setting $parameter to" "${value:-(empty)}" "info"
|
||||
eval "$parameter=\"$value\""
|
||||
done
|
||||
|
||||
if [[ $BUILD_ALL == yes || $BUILD_ALL == demo ]]; then
|
||||
|
||||
Reference in New Issue
Block a user