summaryrefslogtreecommitdiff
path: root/support/shlatex/fr/uninstall
blob: a6e467d6111eb1ba1c405f74ca69c3908a7b1087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Script de désinstallation pour ShLaTeX
# Attention : vous devez être root pour exécuter ce script !

user=`whoami`;
version="1.2b-fr";
cheminMan="/usr/share/man/fr/man1";
cheminExec="/usr/bin";
cheminScript="/usr/share";

if [ ! $user == "root" ]
then
	echo "> Erreur : vous devez être 'root' pour exécuter ce script";
	echo "    Se reporter au fichier README.TXT pour plus d'informations.";
	exit 1;
fi

if [ ! -d "$cheminScript/shlatex-$version" ]
then
	echo "> Avertissement : le script ShLaTeX-$version semble ne pas être installé !";
fi

echo -ne "\n> Désinstallation en cours...\n"
cd /

rm -f "$cheminExec/ShLaTeX-$version"
rm -f "$cheminMan/shlatex.1.bz2"
rm -fr "$cheminScript/shlatex-$version"
if [ "`ls $cheminScript | grep "^shlatex-"`" == "" ]
then
	rm -f "$cheminExec/tex8to7"
	rm -f "$cheminExec/ShLaTeX"
else
	echo "> Avertissement : une autre version de ShLaTeX semble être présente"
	echo "    Le programme tex8to7 n'a pas été effacé."
fi
echo -ne "> Terminé.\n\n"
cd -