aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/update-monomers-db23
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/update-monomers-db b/scripts/update-monomers-db
index e2b651045..d34c4baea 100644
--- a/scripts/update-monomers-db
+++ b/scripts/update-monomers-db
@@ -1,8 +1,9 @@
#!/bin/bash
-DATE=$(date "+%Y%m%d")
+DATE=$(date "+%y%m%d")
CHANGE_ENTRY="automatic bump"
MIRROR=
+TMPDIR="/tmp/${USER}/"
# Find the Documentation dir from sci overlay
@@ -15,21 +16,21 @@ fi
bump_package() {
- mv refmac_dictionary.tar.gz /home/jlec/science-dist/monomer-db-${DATE}.tar.gz
+ mv refmac_dictionary.tar.gz monomer-db-0.${DATE}.tar.gz
+ cp -f monomer-db-0.${DATE}.tar.gz /home/${USER}/science-dist/
# 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
+ [[ -f monomer-db-0.${DATE}.ebuild ]] || \
+ git mv monomer-db-0.*ebuild monomer-db-0.${DATE}.ebuild
+ echangelog ${CHANGE_ENTRY}
+ DISTDIR="${TMPDIR}" repoman -d -v fix
git add .
git ci -m "${CHANGE_ENTRY}"
-
- rm /tmp/monomer-db*
}
-
-cd /tmp;
+mkdir ${TMPDIR}
+cd ${TMPDIR};
wget http://www.ysbl.york.ac.uk/~garib/refmac/data/refmac_dictionary.tar.gz
@@ -41,7 +42,5 @@ if [[ ${SHA_OLD} == ${SHA_NEW} ]]; then
echo "Nothing to update"
else
echo "bumping to monomer-db-${DATE} ..."
- $(bump_package)
+ bump_package
fi
-
-rm -f /tmp/refmac_dictionary.tar.gz