On Sunday 27 April 2008 10:58, Cristian Ionescu-Idbohrn wrote:
> * neither $lcwd nor ${lcwd%/*} need to be quote protected
> 
>  lcwd=$(pwd)
> -[ "$tsdir" ] || tsdir="$lcwd"
> -[ "$bindir" ] || bindir="${lcwd%/*}" # one directory up from $lcwd
> +[ "$tsdir" ] || tsdir=$lcwd
> +[ "$bindir" ] || bindir=${lcwd%/*} # one directory up from $lcwd

Not obvious to me

> * "links" does not need to be quote protected

But looks more symmetrical this way, no?

> * the general style in the script is _not_ to write simple if-blocks
>   on a single line
> 
> -     if [ "$applet" = "links" ]; then continue; fi
> +     if [ "$applet" = links ]; then
> +             continue
> +     fi

ok

> * applet does not need to be protected
> 
> -     if [ -f "${applet}.tests" ]; then
> +     if [ -f "$applet.tests" ]; then
> 
> -#            echo "Running test ${tsdir:-.}/${applet}.tests"
> -             PATH="$LINKSDIR:$tsdir:$bindir:$PATH" 
> "${tsdir:-.}/${applet}.tests"
> +#            echo "Running test ${tsdir:-.}/$applet.tests"
> +             PATH="$LINKSDIR:$tsdir:$bindir:$PATH" 
> "${tsdir:-.}/$applet.tests"
>               test $? -eq 0 || status=1

ok.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to