1#!/bin/sh
2
3if [ -z "${MAKE}" ]; then
4	 MAKE=make
5	gmake --help >/dev/null 2>&1
6	[ $? = 0 ] && MAKE=gmake
7fi
8
9echo "All files related to current and previous installations
10of r2 (including libraries) will be deleted. Continue? (y/n) "
11read answer
12case "$answer" in
13y|Y)
14    if [ -x /usr/bin/apt-get ] ; then
15	    sudo apt-get remove radare2
16	    sudo apt-get remove libradare2-common
17	    sudo apt-get remove --auto-remove libradare2-common
18	    sudo apt-get purge libradare2-common
19	    sudo apt-get purge --auto-remove libradare2-common
20	    sudo apt-get remove libradare2
21	    sudo apt-get remove --auto-remove libradare2
22	    sudo apt-get purge libradare2
23	    sudo apt-get purge --auto-remove libradare2
24    fi
25    # TODO: support brew
26    # TODO: support archlinux
27    # TODO: support gentoo
28    exit 0
29esac
30
31echo "Aborting."
32exit 1
33