#!/bin/bash
#
#Rockey4ND uninstall script
#
#Check whether the current user is root
if test $(id -ur) != 0; then
    echo
    echo "You should logon as root user!"
	echo
    exit -1
fi
rm -f /usr/local/lib/*Rockey4ND.so
if [ ! -f /usr/local/include/rockey.h ]; then
	if [ ! -f /usr/local/lib/libRockey4ND.a ]; then
        if [ ! -f /usr/local/lib/libRockey4ND.so.0.3 ]; then
            if [ ! -f /usr/local/lib/libJRockey4ND.so.0.3 ]; then
                echo
                echo "The file that this program was about to uninstall !"
                echo
                exit -1
            fi
        fi
    fi
fi
echo
echo Uninstalling Rockey4ND SDK...
echo
 
#Delete Rockey4ND libs
rm -rf /usr/local/include/rockey.h
rm -f /usr/local/lib/*Rockey4ND*

/sbin/ldconfig

echo Uninstall finished!

