On Jan 25, 2008 2:23 AM, Jonas Karlsson <[EMAIL PROTECTED]> wrote: > 2008/1/25, Lucas C. Villa Real <[EMAIL PROTECTED]>: > > > CVSROOT: /sources/goboscripts > > Module name: tools > > Changes by: Lucas C. Villa Real <lucasvr> 08/01/25 10:07:45 > > > > Modified files: > > Scripts/Functions: Requirements > > Scripts/bin : SymlinkProgram > > > > Log message: > > Deducting everything from $recipedir and $target. This should put a > > smile upon Jonas' face for the rest of the day. > > > > CVSWeb URLs: > > http://cvs.savannah.gnu.org/viewcvs/tools/Scripts/Functions/Requirements?cvsroot=goboscripts&r1=1.3&r2=1.4 > > http://cvs.savannah.gnu.org/viewcvs/tools/Scripts/bin/SymlinkProgram?cvsroot=goboscripts&r1=1.53&r2=1.54 > > > > Patches: > > Index: Functions/Requirements > > =================================================================== > > RCS file: /sources/goboscripts/tools/Scripts/Functions/Requirements,v > > retrieving revision 1.3 > > retrieving revision 1.4 > > diff -u -b -r1.3 -r1.4 > > --- Functions/Requirements 25 Jan 2008 06:47:49 -0000 1.3 > > +++ Functions/Requirements 25 Jan 2008 10:07:45 -0000 1.4 > > @@ -3,9 +3,11 @@ > > # Functions to handle Resources/Requirements > > > > function Process_Requirements_File() { > > - local package="$1" > > - local version="$2" > > - local reqfile="$3" > > + local reqfile="$1/Resources/Requirements" > > + local nover="${1%/*}" > > + local nopkg="${1%/*/*}" > > + local package=`echo "$1" | sed "s,$nopkg/\(.*\)/.*,\1,g"` > > + local version=`echo "$1" | sed "s,$nover/\(.*\),\1,g"` > > > This wasn't exactly the way I thought. More like: > > local package=$(Arg 1) > if [ -n "$(Arg 2)" ] > then > version=Get_Version $package $(Arg 2) > else > version=Get_Version $package Current > fi > > if [ -n "$(Arg 3)" ] > then > reqfile=$(Arg 3) > else > reqfile=$goboPrograms/$package/$version/Resources/Requirements > fi > > or similar. One could probably detect if one is running Compile or not > and use that to use $compileRecipeDir instead of $goboPrograms
I think that's much more susceptible to errors than just specifying the path to recipedir/target, as we'll want to support cross-compiling in the future as well. recipedir/target already offer all the necessary information in a single parameter and will scale much better. -- Lucas powered by /dev/dsp _______________________________________________ gobolinux-devel mailing list [email protected] http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel
