script modified

This commit is contained in:
Lucio Lelii 2020-04-09 11:20:01 +02:00
parent 12ac117046
commit 87ecf94971
5 changed files with 22 additions and 13 deletions

View File

@ -160,8 +160,8 @@ echo -e "\ninstalling components \c"
for f in $distrolibs/*.*; for f in $distrolibs/*.*;
do do
if [ -z "$dryrun" ]; then if [ -z "$dryrun" ]; then
cp $f $shared/ cp $f $shared/
basename $f >> $shared/$liblist basename $f | sed -r 's/[0-9]{1,2}.[0-9]{1,2}(.[0-9]{1,2})?(-SNAPSHOT)?(-[0-9]{1,2}.[0-9]{1,2}(.[0-9]{1,2})?-[0-9]{4,8})?/*/' >> $shared/$liblist
fi fi
echo -n "." echo -n "."
sleep .01 sleep .01

View File

@ -47,7 +47,7 @@ fi
echo -e "\nRemoving resource profiles from the Information System\n" echo -e "\nRemoving resource profiles from the Information System\n"
source ./load-env source ./load-env $ghnhome
#java org.gcube.smartgears.utils.sweeper.AppSweeperClient $apps 1>/dev/null #java org.gcube.smartgears.utils.sweeper.AppSweeperClient $apps 1>/dev/null
#if [ "$?" != "0" ]; then #if [ "$?" != "0" ]; then

View File

@ -38,15 +38,15 @@ fi
echo -e "\nRemoving resource profiles from the Information System\n" echo -e "\nRemoving resource profiles from the Information System\n"
source "$ghnhome"/scripts/load-env source "$ghnhome"/scripts/load-env "$ghnhome"
RETVAL= RETVAL=
if [ -z "$filename" ]; then if [ -z "$filename" ]; then
java org.gcube.smartgears.utils.sweeper.ContainerSweeperClient 1>/dev/null java org.gcube.smartgears.utils.sweeper.ContainerSweeperClient -G"$ghnhome" 1>/home/gcube/SmartGears/containerState.log
RETVAL=$? RETVAL=$?
else else
java org.gcube.smartgears.utils.sweeper.ContainerSweeperClient $filename 1>/dev/null java org.gcube.smartgears.utils.sweeper.ContainerSweeperClient $filename -G"$ghnhome" 1>/home/gcube/SmartGears/containerState.log
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ] ; then if [ $RETVAL -eq 0 ] ; then
echo -e "\nvolatile state saved in $ghnhome/$filename" echo -e "\nvolatile state saved in $ghnhome/$filename"
@ -63,4 +63,5 @@ else
rm -rf $ghnhome/state rm -rf $ghnhome/state
fi fi
exit $RETVAL exit $RETVAL

View File

@ -1,7 +1,15 @@
if [ -z "$GHN_HOME" ]; then ghnhome=$1
echo -e "\nERROR:please specify the GHN_HOME env var." >&2
echo -e "\naborting.\n" if [ -z "$ghnhome" ]; then
exit 1 if [ -z "$GHN_HOME" ]; then
echo -e "\nERROR:please specify the gHN directory (-g) or define the GHN_HOME env var." >&2
showhelp
echo -e "\naborting.\n"
exit 1
else
ghnhome=$GHN_HOME
fi
fi fi
export CLASSPATH=$CLASSPATH:"$GHN_HOME/lib/*"
export CLASSPATH=$CLASSPATH:"$ghnhome/lib/*"

View File

@ -9,7 +9,7 @@
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>smartgears-distribution</artifactId> <artifactId>smartgears-distribution</artifactId>
<version>2.5.0</version> <version>2.5.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>A distribution for the SmartGears Framework</name> <name>A distribution for the SmartGears Framework</name>