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