Commit e49c2acd authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

check for working directory when removing

parent ff3a14d1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -31,11 +31,22 @@ else
    else
       prefix=$( ls -d ${prefix}/universc*/ | head -n 1)
    fi
    prefix=$(readlink -f $prefix)
    current_version=$(cat ${prefix}/.version)
fi

echo "uninstalling universc ${current_version} from: $prefix"

if [[ $prefix == $(pwd) ]] || [[ $prefix == "." ]]
   then
    echo "Current directory not removed"
else
    echo "Removing install in $prefix"
    echo "rm -rf $prefix"
fi

exit 0

# add manual directory to PATH if not already found
## check config for Linux
if [[ -f /etc/manpath.config ]]