geuphooria.sh: use which command to check list of symlinks to be removed

This commit is contained in:
mollusk 2017-05-16 06:11:42 -07:00
parent 3b88baf374
commit 280a2ca3e6

View File

@ -33,7 +33,7 @@ fext="tar.gz"
extcmd="tar"
deps="curl"
target_dir="/usr/local"
url="http://nbtelecom.dl.sourceforge.net/project/rapideuphoria/Euphoria/${version}-${state}/${name}-${version}-Linux-${arch}-57179171dbed.${fext}"
url="https://svwh.dl.sourceforge.net/project/rapideuphoria/Euphoria/${version}-${state}/${name}-${version}-Linux-${arch}-57179171dbed.${fext}"
tmpdir="/tmp"
check_deps(){
@ -110,25 +110,23 @@ post_install(){
ln -v -s ${target_dir}/${name}-${version}-Linux-${arch}/bin/eucoverage /usr/bin
}
symlinks=$(which {eui,euc,eutest,eudist,eudoc,eushroud,euloc,eudis,eubind,eub,echoversion,creole,eucoverage})
uninstall_pkg(){
if [ ! -d ${target_dir}/${name}-${version}-Linux-${arch} ];then
printf "${name}-${version} is not installed\n"
if [[ $symlinks ]];then
rm $symlinks
fi
else
rm -v -r ${target_dir}/${name}-${version}-Linux-${arch}
rm -v /usr/bin/eui
rm -v /usr/bin/euc
rm -v /usr/bin/eutest
rm -v /usr/bin/eudist
rm -v /usr/bin/eudoc
rm -v /usr/bin/eushroud
rm -v /usr/bin/euloc
rm -v /usr/bin/eudis
rm -v /usr/bin/eubind
rm -v /usr/bin/eub
rm -v /usr/bin/echoversion
rm -v /usr/bin/creole
rm -v /usr/bin/eucoverage
if [[ $symlinks ]];then
rm $symlinks
fi
if [ ! -d ${target_dir}/${name}-${version}-Linux-${arch} ];then
echo