PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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