2007/2/4, Lucas C. Villa Real <[EMAIL PROTECTED]>:
> CVSROOT:        /sources/goboscripts
> Module name:    tools
> Changes by:     Lucas C. Villa Real <lucasvr>   07/02/04 03:20:32
>
> Modified files:
>         ChrootCompile/bin: ChrootCompile
>
> Log message:
>         Added 'setup-environment' flag and scriptExample.
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/tools/ChrootCompile/bin/ChrootCompile?cvsroot=goboscripts&r1=1.37&r2=1.38
>
> Patches:
> Index: ChrootCompile
> ===================================================================
> RCS file: /sources/goboscripts/tools/ChrootCompile/bin/ChrootCompile,v
> retrieving revision 1.37
> retrieving revision 1.38
> diff -u -b -r1.37 -r1.38
> --- ChrootCompile       3 Feb 2007 20:30:40 -0000       1.37
> +++ ChrootCompile       4 Feb 2007 03:20:32 -0000       1.38
> @@ -15,8 +15,10 @@
>  scriptUsage="[options] <path_to_recipe>"
>  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_Boolean "s" "setup-environment" "Creates the chroot environment 
> by calling SetupChrootEnv" ""
>  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." ""
> +scriptExample="--local-repository /Files/Compile/LocalRecipes/Foo/1.0"
>  helpOnNoArguments=yes
>  Parse_Options "$@"
>
> @@ -92,10 +94,17 @@
>  # Verify our whereabouts
>  #############################################################################
>  [ "$chrootCompileDir" ] && cd "$chrootCompileDir"
> -if [ ! -d BaseDependencies -a ! "$local_programs" ]
> +
> +if Boolean "setup-environment" || [ ! -d BaseDependencies -a ! 
> "$local_programs" ]
>  then
> -    [ ! -z "`ls`" ] && Die "Your ChrootCompile dir ($chrootCompileDir) is 
> corrupt. Please correct and then rerun ChrootCompile."
> -    Log_Normal "No ChrootCompile environment found in $chrootCompileDir. 
> Setting things up..."
> +    if [ ! -z "`ls`" ]
> +    then Die "Your ChrootCompile dir is not empty. Please correct and then 
> rerun ChrootCompile."
> +    fi
> +    if [ "$chrootCompileDir" ]
> +    then dirname="$chrootCompileDir"
> +    else dirname="$PWD"
> +    fi
> +    Log_Normal "No ChrootCompile environment found in $dirname. Setting 
> things up..."
>      SetupChrootEnv
>  fi

How about making "setup-environment" taking an argument and default to
$PDW if no argument is given?

-- 
/Jonas
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to