commit 01fe907883e8d482a7b1f28ad6e5a6131fb2fbac
parent 56cd94a15971a6713e2435af294a1acbecd56ab9
Author: umhau <umhau@alum.gcc.edu>
Date: Sun, 18 Jun 2017 20:25:11 -0400
simplify vmc removal
Diffstat:
3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/installvmc.sh b/installvmc.sh
@@ -21,9 +21,9 @@ libdir=/opt/vmc/lib
if [ -d /opt/vmc/ ]; then
- bash $scriptpath/uninstallvmc.sh 1>/dev/null; echo -n "Removed vmc";
+ bash "$scriptpath/vmc -remove 1>/dev/null"; echo -n "Removed vmc";
- # echo "vmc is already installed. To remove, run uninstallvmc.sh"; exit 1
+ # echo "vmc is already installed. To remove, run vmc -remove"; exit 1
fi
diff --git a/uninstallvmc.sh b/uninstallvmc.sh
@@ -1,14 +0,0 @@
-#!/bin/bash
-#
-# USAGE: bash uninstallvmc
-#
-
-# DELETE EVERYTHING ===========================================================
-
-sudo rm -rf /opt/vmc
-
-sudo rm -f /usr/local/bin/vmc
-
-sudo rm -f /usr/local/bin/lmt
-
-echo "vmc removed."
diff --git a/vmc b/vmc
@@ -44,6 +44,8 @@
# vmc en-us \
# -adapt /extant/model/location \
# -importrecordings /audio/files/location
+#
+# vmc [ -remove OR -uninstall ]
#
# VARIABLES ===================================================================
@@ -60,6 +62,16 @@ libdir="/opt/vmc/lib"
# COMMANDS ====================================================================
+# remove vmc ------------------------------------------------------------------
+
+if [ $1 == '-remove' ] || [ $1 == '-uninstall' ]; then
+ echo -n "Press [enter] to confirm removing VMC."; read
+ sudo rm -rf /opt/vmc
+ sudo rm -f /usr/local/bin/vmc
+ sudo rm -f /usr/local/bin/lmt
+ echo "vmc removed."
+fi
+
# misc. housekeeping ----------------------------------------------------------
sudo ls 1>/dev/null # get sudo