aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-06-01 09:00:20 -0500
committerRob Landley <rob@landley.net>2020-06-01 09:00:20 -0500
commit8cb4dbec6734761c0fa27aa4c3bd6e9952cb1286 (patch)
treeb70c3fb26a7ec7451486bbc0999dcb13ba75f6e8
parentb2dd9953d83b9e6d8012b6b1b43869316eb112b7 (diff)
downloadtoybox-8cb4dbec6734761c0fa27aa4c3bd6e9952cb1286.tar.gz
Let $PENDING select more commands out of pending to enable.
-rwxr-xr-xscripts/mkroot.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/mkroot.sh b/scripts/mkroot.sh
index 3d46099f..4bc80ab9 100755
--- a/scripts/mkroot.sh
+++ b/scripts/mkroot.sh
@@ -25,7 +25,7 @@ if [ ! -z "$CROSS" ]; then
if [ "${CROSS::3}" == all ]; then
for i in $(ls "$CCC" | sed -n 's/-.*//p' | sort -u | xargs); do
{ rm -f "$LOG/$i-log".{failed,success}
- "$0" "$@" CROSS=$i ; [ $((X=$?)) -eq 0 ] && mv "$LOG/$i".{txt,success}
+ "$0" "$@" CROSS=$i ; [ $? -eq 0 ] && mv "$LOG/$i".{txt,success}
} |& tee "$LOG/$i.txt"
[ ! -e "$LOG/$i.success" ] &&
{ mv "$LOG/$i".{txt,failed};[ "$CROSS" != allnonstop ] && exit 1; }
@@ -116,8 +116,9 @@ echo -e 'root:x:0:\nguest:x:500:\nnobody:x:65534:' > "$ROOT"/etc/group || exit 1
# Build static toybox with existing .config if there is one, else defconfig+sh
announce toybox
-[ -e .config ] && CONF=silentoldconfig || unset CONF
-make clean ${CONF:-defconfig KCONFIG_ALLCONFIG=<(echo $'CONFIG_SH=y\nCONFIG_ROUTE=y')} &&
+[ -e .config ] && [ -z "$PENDING" ] && CONF=silentoldconfig || unset CONF
+for i in $PENDING sh route; do XX="$XX"$'\n'CONFIG_${i^^?}=y; done
+make clean ${CONF:-defconfig KCONFIG_ALLCONFIG=<(echo "$XX")} &&
LDFLAGS=--static PREFIX="$ROOT" make toybox install || exit 1
# Build any packages listed on command line