cleanNewMetaLight 689 Bytes
#!/bin/bash

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

if [ -z ${NEWMETA} ]
then
        echo "[ERROR] check if NEWMETA env variable is defined"
        exit 1
fi

if [ -z ${AMDA_SPASE_INTERFACE} ]
then
        echo "[ERROR] check if AMDA_SPASE_INTERFACE env variable is defined"
        exit 1
fi

if [ -d "$NEWMETA" ]
then 
	
	for Dir in $(find -L $NEWMETA/* -type d  -not -path $NEWMETA/ParamInfo* )
		do
			rm -f ${Dir}/*   
		done 	
else
     echo "[ERROR] NEWMETA dir not exists" 
fi

if [ -d "$AMDA_SPASE_INTERFACE" ]
then
	rm -f $AMDA_SPASE_INTERFACE/SPASE/*
else
     echo "[ERROR] AMDA_SPASE_INTERFACE env var is not defined"
fi