-
Notifications
You must be signed in to change notification settings - Fork 0
/
eosio_uninstall.sh
executable file
·41 lines (38 loc) · 1.22 KB
/
eosio_uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/bash
binaries=(cleos
eosio-abigen
eosio-launcher
eosio-s2wasm
eosio-wast2wasm
eosiocpp
keosd
nodeos
eosio-applesdemo)
if [ -d "/usr/local/eosio" ]; then
printf "\tDo you wish to remove this install? (requires sudo)\n"
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
if [ "$(id -u)" -ne 0 ]; then
printf "\n\tThis requires sudo, please run ./eosio_uninstall.sh with sudo\n\n"
exit -1
fi
pushd /usr/local &> /dev/null
rm -rf eosio
pushd bin &> /dev/null
for binary in ${binaries[@]}; do
rm ${binary}
done
# Handle cleanup of directories created from installation
if [ "$1" == "--full" ]; then
if [ -d ~/Library/Application\ Support/eosio ]; then rm -rf ~/Library/Application\ Support/eosio; fi # Mac OS
if [ -d ~/.local/share/eosio ]; then rm -rf ~/.local/share/eosio; fi # Linux
fi
popd &> /dev/null
break;;
[Nn]* )
printf "\tAborting uninstall\n\n"
exit -1;;
esac
done
fi