iphreeqc/jenkins-R-dist.sh
Scott R Charlton ce5c983e6a added jenkins build script for iphreeqc-R-dist-linux
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@10649 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2016-01-07 04:44:28 +00:00

23 lines
625 B
Bash

#!/bin/sh
# set DATE
if [ -z "$DATE" ]; then
DATE=$(date "+%x")
fi
DATE=$(date -d $DATE "+%Y-%m-%d")
# set VER
if [ -z "$VER" ]; then
wget https://cran.r-project.org/web/packages/phreeqc/ -O index.xhtml 2> /dev/null
VER=`xmlstarlet sel -t -m "/_:html/_:body/_:table[1]/_:tr[1]/_:td[2]" -v . -n index.xhtml 2> /dev/null`
ver_major=`echo $VER | cut -d '.' -f 1`
ver_minor=`echo $VER | cut -d '.' -f 2`
ver_patch=`echo $VER | cut -d '.' -f 3`
ver_patch=$((ver_patch+1))
VER="${ver_major}.${ver_minor}.${ver_patch}"
fi
cd R
make VERSION=${VER} RELEASE_DATE=${DATE} build
make VERSION=${VER} RELEASE_DATE=${DATE} check