#!/bin/bash # Uninstall script for ShLaTeX # Warning : you must be root to run this script ! user=`whoami`; version="1.2b-en"; cheminMan="/usr/share/man/man1"; cheminExec="/usr/bin"; cheminScript="/usr/share"; if [ ! $user == "root" ] then echo "> Error : you must be 'root' to run this script"; echo " See the README.TXT file for further details."; exit 1; fi if [ ! -d "$cheminScript/shlatex-$version" ] then echo "> Warning : the script ShLaTeX-$version doesn't seem to be installed !"; fi echo -ne "\n> Uninstall in progress...\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 "> Warning : another version of ShLaTeX seems to be present" echo " The program tex8to7 hasn't been removed." fi echo -ne "> Done.\n\n" cd -