diff options
author | dlion <domenico.luciani@email.it> | 2012-09-06 01:49:50 +0200 |
---|---|---|
committer | dlion <domenico.luciani@email.it> | 2012-09-06 01:49:50 +0200 |
commit | 60f2d6c1f48c92fa2408946fa448d6b2f7b01730 (patch) | |
tree | 42ef86313a957d158eec9190fe36ebe4662c1821 /uninstall.sh | |
parent | b128e058540a9b99d54cce7a73d4ce74a1b68f39 (diff) |
A simple uninstall script
Diffstat (limited to 'uninstall.sh')
-rwxr-xr-x | uninstall.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 00000000..82515a15 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +if [ $(id -u) -ne 0 ]; then + echo -e "* ERROR: User $(whoami) is not root, and does not have sudo privileges" + exit 1 +fi + +if [ ! -f "setup.py" ]; then + echo -e "* ERROR: Setup file doesn't exist" + exit 1 +fi + + + +python setup.py install --record install.record + +for i in $(cat install.record); do + rm $i +done + +echo -e "\n\n* SUCCESS: Uninstall complete." +rm install.record + + + + + + + |