keeping list of smartgears apps installed in order to unistall them

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/distributions/smartgears-distribution@94758 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Andrea Manzi 2014-04-11 10:48:26 +00:00
parent d170b4bc15
commit 59cfb523e8
1 changed files with 20 additions and 2 deletions

View File

@ -9,7 +9,7 @@ distrolibs=$distro/libs
distroapps=$distro/apps
distroscripts=$distro/scripts
liblist=smartgears.list
applist=smartgears-app.list
function showhelp {
echo -e "\nusage: install [-d <distro directory>] -s tomcat|<lib directory> -a [app directory] [-g gHN directory] [-x|-h] \n"
@ -114,7 +114,7 @@ shopt -s nullglob
#uninstall libraries
if [ -f $shared/$liblist ]; then
echo -e "\nuninstalling existing components \c"
echo -e "\nuninstalling existing libraries \c"
while read line; do
if [ -z "$dryrun" ]; then
rm $shared/$line
@ -129,6 +129,23 @@ if [ -f $shared/$liblist ]; then
fi
#uninstall apps
if [ -f $shared/$applist ]; then
echo -e "\nuninstalling existing apps \c"
while read line; do
if [ -z "$dryrun" ]; then
rm $apps/$line
fi
echo -n "."
sleep .01
done < $shared/$applist
if [ -z "$dryrun" ]; then
rm $shared/$applist
fi
fi
#install libraries
echo -e "\ninstalling components \c"
for f in $distrolibs/*.*;
@ -148,6 +165,7 @@ for f in $distroapps/*;
do
if [ -z "$dryrun" ]; then
cp $f $apps/
basename $f >> $shared/$applist
fi
echo -n "."
sleep .01