Hi, I'd like to "improve" my proposal. Please find attached a modified "sage-env.sage-5.7.patch.txt" file.
In my previous patch, I proposed "special" patterns for initialization scripts' names: "pre-??-env-*" and "post-??-env-*" (with two characters "??" that always had to appear). However, I think the "-??" part is redundant. In my "improved" patch, I propose patterns in form: "pre-env-*" and "post-env-*". This still allows people to make sure that packages get initialized in a specific order. One can simply use: pre-env-10-PackageOne pre-env-20-PackageTwo post-env-10-PackageOne post-env-20-PackageTwo Additionally, if one does not care about the order of initialization, one can simply use: pre-env-PackageThree pre-env-PackageFour post-env-PackageThree post-env-PackageFour So, in this case there is no need to introduce these two additional characters ("-??" in the old patch). Hope it helps, Best regards, Jacek. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
--- sage-env.orig 2013-02-19 13:49:55.000000000 +0100 +++ sage-env 2013-02-26 20:13:58.257075542 +0100 @@ -267,6 +267,15 @@ CPATH="${CPATH}:/usr/include/$MULTI_ARCH" fi +# Source any "${SAGE_LOCAL}/toolchain/pre-env-*" scripts. +if [ -d "${SAGE_LOCAL}/toolchain" ] ; then + for f in ${SAGE_LOCAL}/toolchain/pre-env-* ; do + [ ! -e "${f}" ] && continue # skip nonexistent files + # echo "sage-env ... sourcing ... ${f}" + source "${f}" + done +fi + # For PARI/GP GP_DATA_DIR="$SAGE_LOCAL/share/pari" && export GP_DATA_DIR GPHELP="$SAGE_LOCAL/bin/gphelp" && export GPHELP @@ -605,3 +614,12 @@ exit 1 fi fi + +# Source any "${SAGE_LOCAL}/toolchain/post-env-*" scripts. +if [ -d "${SAGE_LOCAL}/toolchain" ] ; then + for f in ${SAGE_LOCAL}/toolchain/post-env-* ; do + [ ! -e "${f}" ] && continue # skip nonexistent files + # echo "sage-env ... sourcing ... ${f}" + source "${f}" + done +fi