From 0a755b208e8b3b0965026de669e4cdda105e86ff Mon Sep 17 00:00:00 2001 From: m Date: Sun, 27 Sep 2020 20:24:28 +0000 Subject: [PATCH] Subir archivos a '' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no probado. uninstall aƱadido. --- uninstall.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..c3cb94b --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +if [ "$UID" != "0" ]; then + echo " Only root can execute this script, sorry." + echo " Try 'sudo ./uninstall.sh'" + exit 0 +fi + +# Si existe el archivo lch +if [[ -f "/usr/bin/lch" ]]; then + rm /usr/bin/lch +fi + +# Si existe el directorio lch +if [[ -d "/usr/lib/lch" ]]; then + rm -rf "/usr/lib/lch" +fi + +# Si nulo manpath +if [ -z "$MANPATH" ]; then + MANPATH=$(manpath) +fi + +MANDIR=${MANPATH%%:*}/man1 + +# Si man lch.1 +if [[ -f "$MANDIR/lch.1" ]]; then + rm "$MANDIR/lch.1" +fi + +# Si man lch.1.gz +if [[ -f "$MANDIR/lch.1.gz" ]]; then + rm "$MANDIR/lch.1.gz" +fi + +echo "=============================" +echo " lch uninstalled successfully." +echo "=============================" +echo "" + + +