#!/bin/sh
if [ ! -f syginstallappli.tar ]
then
echo "le fichier syginstallappli.tar n'est pas present"
exit 0
fi
echo "entrer le repertoire d'installation (chemin absolu)"
read R
if [ ! -d "$R" ]
then
echo "le repertoire $R n ' existe pas"
exit 0
fi
if [ -d ${R}/APPLI ]
then
echo "le repertoire ${R}/APPLI existe"
echo "APPLI deja installe a cet endroit"
echo "voulez vous continuer quand meme (o|O|y|Y)?"
read C
if [ ${C} != "o" -a ${C} != "O"  -a ${C} != "y" -a ${C} != "Y" ]
then
exit 0
fi
rm -Rf ${R}/APPLI
fi
rm INSTALLAPPLI.sh
tar xf syginstallappli.tar
rm syginstallappli.tar
cd ${R}/APPLI
${R}/APPLI/SIGNMSGRAPPLI ${R}
chmod a+wrx ${R}/APPLI/tmp
echo "Sygappli est installé"
exit 0
