diff options
author | 2009-04-26 21:32:40 +0200 | |
---|---|---|
committer | 2009-04-26 21:32:40 +0200 | |
commit | 1c459adc5ae6385ad9630e7956e83306e8848de7 (patch) | |
tree | 7a17dbdf585c36375b54e7259bc23b2f74290b86 /scripts | |
parent | sci-libs/monomer-db added (diff) | |
download | sci-1c459adc5ae6385ad9630e7956e83306e8848de7.tar.gz sci-1c459adc5ae6385ad9630e7956e83306e8848de7.tar.bz2 sci-1c459adc5ae6385ad9630e7956e83306e8848de7.zip |
update-monomers-db added
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/update-monomers-db | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/update-monomers-db b/scripts/update-monomers-db new file mode 100644 index 000000000..0d854d6cb --- /dev/null +++ b/scripts/update-monomers-db @@ -0,0 +1,43 @@ +#!/bin/bash + +DATE=$(date "+%Y%m%d") +CHANGE_ENTRY="automatic bump" +MIRROR= + +# Find the Documentation dir from sci overlay + +if [[ -f $(basename $0) ]]; then + REPO_DOC=$(pwd) +else + REPO_DOC=$(dirname $0) +fi + + +cd /tmp; + +wget http://www.ysbl.york.ac.uk/~garib/refmac/data/refmac_dictionary.tar.gz + +SHA_NEW=$(sha256sum refmac_dictionary.tar.gz) +SHA_OLD=$(sed -n -e '/^DIST monomer/p ${REPO_DOC}/../sci-libs/monomer-db/Manifest | \ + tail -n 1 | awk '{print $9}') + +if [[ ${SHA_OLD} == ${SHA_NEW} ]]; then + echo "Nothing to update" +else + echo "bumping to monomer-db-${DATE} ..." + $(bump_package) +fi + + +bump_package() { + mv refmac_dictionary.tar.gz monomer-db-${DATE}.tar.gz + scp monomer-db-${DATE}.tar.gz ${MIRROR} + + cd ${REPO_DOC}/../sci-libs/monomer-db/ + git mv monomer-db*ebuild monomer-db-${DATE}.ebuild + echangelog '${CHANGE_ENTRY}' + repoman -d -v fix + git add . + git ci -m "${CHANGE_ENTRY}" +} + |