Posted By

4fthawaiian on 06/13/11


Tagged

atlassian jira jars


Versions (?)

check jar versions


 / Published in: Awk
 

This is some ugly-ass code, but it works to see if you need to update the atlassian jira jars. Meant to be in /opt/j2ee/domains/domainname.com/instance/tomcat/lib/newdir

  1. for i in *.jar; do set -- `echo $i |awk -F- '{sub(/.jar/,"",$0)} {if ($2 !~ /[0-9]/) {print $1"-"$2,$3} else {print $1,$2} }'`;jarname=$1;newver=$2; set -- `ls ../*.jar |grep "$jarname-[0-9]" |awk -F- '{sub(/.jar/,"",$0)} {if ($2 !~ /[0-9]/) {print $3} else {print $2} }'`; if [ "$newver" != "$1" ]; then echo $jarname $newver $1; fi; done

Report this snippet  

You need to login to post a comment.