/sdk-installer/src/main/osx/uninstall.sh

https://bitbucket.org/mmeinhold/amps · Shell · 29 lines · 20 code · 6 blank · 3 comment · 4 complexity · c7195829896476a22fa8e52199566a34 MD5 · raw file

  1. #!/bin/sh
  2. if [ `whoami` != root ]; then
  3. echo "Please run this script as root or using sudo"
  4. exit
  5. fi
  6. RemoveSDK () {
  7. echo "removing files..."
  8. # remove the symlinks from /usr/local/bin
  9. for f in `find /usr/local/bin/ -name "atlas-*"`; do
  10. rm $f
  11. done
  12. #remove the sdk from /usr/share
  13. rm -rf /usr/share/atlassian-plugin-sdk-${project.version}
  14. echo "Atlassian Plugin SDK has been uninstalled"
  15. }
  16. while true; do
  17. read -p "This will completely remove Atlassian Plugin SDK v${project.version}! Do you wish to continue? (Y/N) " yn
  18. case $yn in
  19. [Yy]* ) RemoveSDK; break;;
  20. [Nn]* ) exit;;
  21. * ) echo "Please answer yes or no.";;
  22. esac
  23. done