Guest User

Untitled

a guest
Feb 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # If there is not already a SITE_PACKAGES environment variable, then get it
  4. # from Python.
  5. if [ ! -d $SITE_PACKAGES ]
  6. then
  7. SITE_PACKAGES=`python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`
  8. fi
  9.  
  10. # If given name is a symbolic link in $SITE_PACKAGES
  11. if [ -h $SITE_PACKAGES/`basename $1` ]; then
  12. # Remove it
  13. rm -Rf $SITE_PACKAGES/`basename $1`
  14. else
  15. # Signal an error.
  16. echo "Error: link `basename $1` not found."
  17. exit 1
  18. fi
Add Comment
Please, Sign In to add comment