File set_tomcat_8.5.latest.sh of Package dba-tomcat-8516-core

#!/bin/bash
#set -x
v=`ls -1d 8.5.? 8.5.?? 2>/dev/null|cut -d "." -f3 |sort -n |tail -1`
i=`ls -l 8.5.latest.bak* 2>/dev/null|wc -l`
test -L 8.5.latest && mv 8.5.latest 8.5.latest.bak.${i}
rc=`ln -fs 8.5.${v} 8.5.latest`
exit $rc