On 12/4/06, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
> --- bin/ChrootCompile   4 Dec 2006 18:47:14 -0000       1.15
> +++ bin/ChrootCompile   4 Dec 2006 21:02:11 -0000       1.16
> @@ -15,17 +15,18 @@
>  Add_Option_Boolean "l" "local-repository" "Look at the local repository for 
> recipes." ""
>  Add_Option_Boolean "p" "local-programs" "Take entries from /Programs (use 
> with care)." ""
>  Add_Option_Entry "X" "cross-compile" "Use a cross-compiler according to the 
> configuration in Cross-<parameter>.conf." ""
> +Add_Option_Entry "d" "use-directory" "Use specified directory as root for 
> ChrootCompile." ""
>  Parse_Options "$@"
>
>
>  #############################################################################
>  # Operation
>  #############################################################################
> -chrootcompileMode="gobo"
> -[ -e "./Compile.conf" ] && chrootcompileCompileConf="./Compile.conf"
> -
> +Parse_Conf Compile.conf
>  # allows one to override any of the above variables
> -[ -e "./ChrootCompile.conf" ] && source "./ChrootCompile.conf"
> +Parse_Conf --mandatory ChrootCompile.conf

ChrootCompile.conf should be optional, there's no need to use --mandatory here.

> +Is_Entry "use-directory" && chrootCompileDir="$(Entry 'use-directory')"
>
>  if [ "$UID" -ne 0 ]
>  then sudo=sudo
> @@ -80,16 +81,32 @@
>  unset verbose
>  Boolean "verbose" && verbose="--verbose"
>
> -
>  #############################################################################
>  # Verify our whereabouts
>  #############################################################################
>  if [ ! -d BaseDependencies -a ! "$local_programs" ]
>  then
>     if [ ! -z "`ls`" ]
> -   then Die "This doesn't look like a ChrootCompile environment directory. 
> Rerun this script on an empty directory to build an environment."
> +   then
> +      if [ ! -z "${chrootCompileDir}" ]
> +      then
> +         cd "${chrootCompileDir}"

I would suggest to use 'Quiet pushd' (and to add the missing 'Quiet
popd' afterwards).

Cheers,

-- 
Lucas
powered by /dev/dsp
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to