[gobolinux-devel] [gobolinux-commits] tools/Scripts Functions/Requirements bin/Symlin...
Jonas Karlsson
jonka750 at student.liu.se
Fri Jan 25 23:23:03 NZDT 2008
2008/1/25, Lucas C. Villa Real <lucasvr at gobolinux.org>:
> 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
--
/Jonas
More information about the gobolinux-devel
mailing list