[M3devel] [M3Devel] failure to find scripts/version, due to root not set

Peter Eiserloh eiserlohpp at yahoo.com
Sun May 31 21:41:12 CEST 2009


In recent builds, I noticed that the compiler pkg (cm3)
was not getting installed into the pkg directory.  The
build log indicated that "/scripts/version" could not be
found.  

This is understandable, "scripts" is not in my root
directory, but rather it is rooted in the source tree.
Examining further sysinfo.sh is relying upon a variable
"root" to exist.  The script sysinfo.sh is a script
invoked not by users, but by other scripts.  These top
level scripts when simply invoked by a user works well,
but those top level scripts can be called by other than
a user, say a makefile.

My "Makefile" sets ROOT (uppercase), so the toplevel
scripts never go through the search process, and never
set "root" lower case.

My fix was easy, if simplistic.

---- BEGIN ----
 if [ -n "$ROOT" -a -d "$ROOT" ] ; then
   sysinfo="$ROOT/scripts/sysinfo.sh"
+  export root=${ROOT}
 else
   root=`pwd`
   while [ -n "$root" -a ! -f "$root/scripts/sysinfo.sh" ] ; do
---- END ----


+--------------------------------------------------------+
| Peter P. Eiserloh                                      |
+--------------------------------------------------------+


      



More information about the M3devel mailing list