adding clean scripts, fixed download script
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/distributions/smartgears-distribution@82546 82a268e6-3cf1-43bd-a215-b396298e98cfmaster
parent
cb90e7e539
commit
b2b39b77bb
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -1 +1,2 @@
|
||||
* Fabio Simeoni (fabio.simeoni@fao.org), FAO of the UN, Italy
|
||||
* Fabio Simeoni (fabio.simeoni@fao.org), FAO of the UN, Italy
|
||||
* Andrea Manzi (andrea.manzi@cern.ch), CERN, Switzerland
|
@ -0,0 +1,44 @@
|
||||
function showhelp {
|
||||
echo -e "\nusage: clean-app-state -a <app-name> [-g] <ghn_home> [-h] \n"
|
||||
echo " a = the application name whose state has to be cleaned"
|
||||
echo " g = the gHN directory."
|
||||
echo -e " h = shows this help.\n"
|
||||
}
|
||||
|
||||
while getopts ":a:g:xh" opt; do
|
||||
case $opt in
|
||||
g) ghnhome=$OPTARG;;
|
||||
a) apps=$OPTARG;;
|
||||
h) showhelp
|
||||
exit 0 ;;
|
||||
:) echo -e "\nERROR:option -$OPTARG requires an argument." >&2 ;
|
||||
showhelp;
|
||||
echo -e "\naborting.\n"
|
||||
exit 1;;
|
||||
\?) echo -e "\nERROR:invalid option: -$OPTARG";
|
||||
showhelp;
|
||||
echo -e "\naborting.\n"
|
||||
exit 1 >&2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$ghnhome" ]; then
|
||||
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
|
||||
|
||||
|
||||
if [ ! -d "$ghnhome/$apps" ]; then
|
||||
echo -e "\nERROR: apps folder does not exist or is not a directory, aborting." >&2
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "Removing application state $ghnhome/$apps"
|
||||
#removing folder
|
||||
rm -rf $ghnhome/$apps
|
@ -0,0 +1,37 @@
|
||||
function showhelp {
|
||||
echo -e "\nusage: clean-container-state [-g] <ghn_home> [-h] \n"
|
||||
echo " a = the application name whose state has to be cleaned"
|
||||
echo " g = the gHN directory."
|
||||
echo -e " h = shows this help.\n"
|
||||
}
|
||||
|
||||
while getopts "g:h" opt; do
|
||||
case $opt in
|
||||
g) ghnhome=$OPTARG;;
|
||||
h) showhelp
|
||||
exit 0 ;;
|
||||
:) echo -e "\nERROR:option -$OPTARG requires an argument." >&2 ;
|
||||
showhelp;
|
||||
echo -e "\naborting.\n"
|
||||
exit 1;;
|
||||
\?) echo -e "\nERROR:invalid option: -$OPTARG";
|
||||
showhelp;
|
||||
echo -e "\naborting.\n"
|
||||
exit 1 >&2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$ghnhome" ]; then
|
||||
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
|
||||
|
||||
echo "Removing container state $ghnhome"
|
||||
#removing folder
|
||||
rm -rf $ghnhome
|
Loading…
Reference in New Issue