cleanExistingInstallation 832 Bytes
#!/bin/bash

SCRIPT=$(readlink -f "$0")
export UPDATEDIR=$(dirname "$SCRIPT")
. $UPDATEDIR/updateEnv.sh

if [ -z ${DATAPATH} ]
then
	echo "[ERROR] check if DATAPATH directory exists"
	exit 1
fi

if [ -d "$DATAPATH" ]
then
	rm -f $MissionInfo/*.xml
	rm -f $InstrumentInfo/*.xml
	rm -f $DataSetInfo/*.xml
	rm -f $PARAMS_LOCALINFO_DIR/*.xml
	rm -f $ParamTemplate/ParamTemplate/*.xml
	rm -f $PARAMS_LOCALDB_DIR/*.xml 
else
	echo "[WARNING] check if AMDA_IHM/generic_data directory exists"    
fi

if [ -d "$HelpAuto" ]
then
        rm -rf $HelpAuto/img
	rm -f $HelpAuto/*
fi

if [ -d "$AMDA_KERNEL_DIR/app-generate-paraminfo" ]
then 
	rm -rf $AMDA_KERNEL_DIR/app-generate-paraminfo/src/*
	rm -f $AMDA_KERNEL_DIR/app-generate-paraminfo/lib/*	
else
	echo "[WARNING] check if AMDA_Kernel/app-generate-paraminfo directory exists"      
fi