shell to find a file , execute it - exit if 'error' and continue if ' no error'
===

I have to write a shell script and i don't know how to go about it.
Basically i have to write a script where i'd find a file ( it could be possibly named differently). If either file exists then it must be executed, if it returns a 0 ( no error), it should continue the build, if it's not equal to 0 ( returns with error), it should exit. If either file is not found it should continue the build.

the file i have to find could be either .sh or .xml file so it could be either named (file.sh), or (file.xml). 

I have tried to write a script but i doubt it's even closer to what i am looking for. 

<pre>
if [-f /home/(file.sh) or (file.xml)]
then 
  -exec /home/(file.sh) or (file.xml)
   if [ $! -eq 0]; then
   echo "no errors continuing build"
   fi
   else
   if [ $! -ne 0] ; then
   exit ;
   fi
else 
   echo "/home/(file.sh) or (file.xml) not found, continuing build"
fi
</pre>

any help is much appreciated.

Thanks in advance