LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File set_postgresql_9.1.latest.sh of Package dba-postgresql-9116 (Project home:csbuild:DBA)

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