]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add uninstall script for Heat
authorJeff Peeler <jpeeler@redhat.com>
Sun, 24 Jun 2012 02:41:30 +0000 (22:41 -0400)
committerJeff Peeler <jpeeler@redhat.com>
Sun, 24 Jun 2012 02:41:30 +0000 (22:41 -0400)
Change-Id: I1f0cbde19f5b75106d93cafdbd0b8fbf47cbbfe0
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
uninstall.sh [new file with mode: 0755]

diff --git a/uninstall.sh b/uninstall.sh
new file mode 100755 (executable)
index 0000000..e9e09f1
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ $EUID -ne 0 ]; then
+    echo "This script must be run as root."
+    exit
+fi
+
+type -P pip-python &> /dev/null && have_pip_python=1 || have_pip_python=0
+if [ $have_pip_python -eq 1 ]; then
+    pip-python uninstall -y heat
+    exit
+fi
+
+type -P pip &> /dev/null && have_pip=1 || have_pip=0
+if [ $have_pip -eq 1 ]; then
+    pip uninstall -y heat
+    exit
+fi
+
+echo "pip-python not found. install package (probably python-pip) or run
+'easy_install pip', then rerun $0";