Commit | Line | Data |
---|---|---|
651e1c20 PH |
1 | #!/bin/bash |
2 | ||
3 | PACKAGE="{{LIBNAME}}" | |
4 | ||
5 | printf "{{LIBNAME:UC}} Python Library: Uninstaller\n\n" | |
6 | ||
7 | if [ $(id -u) -ne 0 ]; then | |
8 | printf "Script must be run as root. Try 'sudo ./uninstall.sh'\n" | |
9 | exit 1 | |
10 | fi | |
11 | ||
12 | cd library | |
13 | ||
14 | printf "Unnstalling for Python 2..\n" | |
15 | pip uninstall $PACKAGE | |
16 | ||
17 | if [ -f "/usr/bin/pip3" ]; then | |
18 | printf "Uninstalling for Python 3..\n" | |
19 | pip3 uninstall $PACKAGE | |
20 | fi | |
21 | ||
22 | cd .. | |
23 | ||
24 | printf "Done!\n" |