From: Michal Simek <[email protected]> Hush shell not create PWD env variable and script expect that exists.
Add checking mechanism for correct pointing to busybox/hush shell. Check if .config file exist in current folder and in case that not copy ../../.config file from source for systems which are able to compile bysybox sources and report error for other cases. Signed-off-by: Michal Simek <[email protected]> --- shell/hush_test/run-all | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all index 470adaa..6711414 100755 --- a/shell/hush_test/run-all +++ b/shell/hush_test/run-all @@ -10,13 +10,29 @@ unset LC_TIME unset LC_ALL test -x hush || { - echo "No ./hush - creating a link to ../../busybox" - ln -s ../../busybox hush + BUSYBOX=`which busybox` + if test -n "$BUSYBOX" ; then + echo "No ./hush - creating a link to $BUSYBOX" + ln -s $BUSYBOX hush + else + echo "Busybox/Hush shell not exist" + exit 1 + fi } -if test -e ../../.config ; then - eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' ../../.config) + +if test ! -e .config ; then + if test -f ../../.config ; then + cp ../../.config . || exit 1 + else + echo "Missing .config file" + exit 1 + fi fi +eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config) + +PWD=`pwd` + PATH="$PWD:$PATH" # for hush and recho/zecho/printenv export PATH -- 1.5.5.1 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
