...
 
Commits (3)
......@@ -262,7 +262,7 @@ if [ -n "$ISMODULETEST" ]; then
# Early exit when the module is not meant for this WebHare version
if [ "$MODULENOTAPPLICABLE" != "" ]; then
echo ""
echo "$(c red)****** Module is not applicable for this WebHare version *******$(c reset)"
echo "$(c red)****** Module is not applicable for this WebHare version: $MODULENOTAPPLICABLE *******$(c reset)"
echo ""
exit 0
fi
......
......@@ -4,17 +4,28 @@ source ${BASH_SOURCE%/*}/../lib/wh-functions.sh
REQUIRENPMVERSION="5.3.0"
export WHBUILD_PLATFORM="`uname | tr A-Z a-z`"
if [ "$1" == "-v" ]; then
VERBOSE=1
shift
fi
if [ "$1" == "-f" ]; then
FORCE=1
shift
fi
if [ "$1" == "-i" ]; then
IGNORERUNNING=1
shift
while [[ $1 =~ ^-.* ]]; do
if [ "$1" == "-v" ]; then
VERBOSE=1
shift
elif [ "$1" == "-f" ]; then
FORCE=1
shift
elif [ "$1" == "-i" ]; then
IGNORERUNNING=1
shift
elif [ "$1" == "--setup-env" ]; then
SETUPENV=1
shift
else
echo "Illegal option $1"
exit 1
fi
done
# If used as command in 'docker run', initialize the environment
if [ "$$" = "1" -a -n "$WEBHARE_IN_DOCKER" ]; then
SETUPENV=1
fi
# We must have $WEBHARE_DIR, pointing to the 'whtree'.
......@@ -692,6 +703,14 @@ setup_for_console()
WEBHARE_DATAROOT="`cd $WEBHARE_DATAROOT; pwd`" #Ensure we have a full path
}
if [ -n "$SETUPENV" ]; then
check_webhare_not_running
setup_for_console
getwhparameters
setup_webhare_envsettings
fi
case $INSTR in
"exec")
setup_for_console
......
......@@ -12,8 +12,9 @@ RECORD ARRAY addedmodules;
FOREVERY (OBJECT pack FROM moduledef->documentelement->GetElements("meta > packaging"))
{
IF (NOT IsNodeApplicableToThisWebHare(pack))
Print(`MODULENOTAPPLICABLE=1\n`);
STRING error := GetApplicabilityError(GetMyApplicabilityInfo(), ReadApplicableToWebHareNode(pack));
IF (error != "")
Print(`MODULENOTAPPLICABLE="${EncodeJava(error)}"\n`);
}
FOREVERY (OBJECT dependency FROM moduledef->documentelement->GetElements("meta > packaging > dependency")
......