File: uninstall.sh

package info (click to toggle)
senlin 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,436 kB
  • ctags: 5,972
  • sloc: python: 53,479; sh: 465; xml: 406; makefile: 186
file content (21 lines) | stat: -rwxr-xr-x 485 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 senlin
    exit
fi

type -P pip &> /dev/null && have_pip=1 || have_pip=0
if [ $have_pip -eq 1 ]; then
    pip uninstall -y senlin
    exit
fi

echo "pip-python not found. install package (probably python-pip) or run
'easy_install pip', then rerun $0";