Skip to content

Commit

Permalink
Add BG install/uninstall endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Apr 17, 2019
1 parent 458c1e7 commit a4a92c3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
22 changes: 22 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

printf "Trackball Python Library: Installer\n\n"

if [ $(id -u) -ne 0 ]; then
printf "Script must be run as root. Try 'sudo ./install.sh'\n"
exit 1
fi

cd library

printf "Installing for Python 2..\n"
python setup.py install

if [ -f "/usr/bin/python3" ]; then
printf "Installing for Python 3..\n"
python3 setup.py install
fi

cd ..

printf "Done!\n"
24 changes: 24 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

PACKAGE="trackball"

printf "Trackball Python Library: Uninstaller\n\n"

if [ $(id -u) -ne 0 ]; then
printf "Script must be run as root. Try 'sudo ./uninstall.sh'\n"
exit 1
fi

cd library

printf "Unnstalling for Python 2..\n"
pip uninstall $PACKAGE

if [ -f "/usr/bin/pip3" ]; then
printf "Uninstalling for Python 3..\n"
pip3 uninstall $PACKAGE
fi

cd ..

printf "Done!\n"

0 comments on commit a4a92c3

Please sign in to comment.