aboutsummaryrefslogtreecommitdiff
blob: e2b65104541a6820887439c9d2ec021ddf6a0462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/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



bump_package() {
	mv refmac_dictionary.tar.gz /home/jlec/science-dist/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}'
	DISTDIR="/tmp" repoman -d -v fix
	git add .
	git ci -m "${CHANGE_ENTRY}"

	rm /tmp/monomer-db*
}


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

rm -f /tmp/refmac_dictionary.tar.gz