aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher (jlec) <jlec@gentoo.org>2010-02-11 23:32:28 +0100
committerJustin Lecher (jlec) <jlec@gentoo.org>2010-02-11 23:32:59 +0100
commite54a1c3c78a16b35acbeec78a1cc22b697a9359c (patch)
tree64884f687b28d6837f83b29a148abb761461d3e2 /scripts
parentInCvs (diff)
downloadsci-e54a1c3c78a16b35acbeec78a1cc22b697a9359c.tar.gz
sci-e54a1c3c78a16b35acbeec78a1cc22b697a9359c.tar.bz2
sci-e54a1c3c78a16b35acbeec78a1cc22b697a9359c.zip
scripts dir cleaned
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/portdupe36
-rw-r--r--scripts/stage-blast-db41
-rw-r--r--scripts/update-monomers-db48
3 files changed, 36 insertions, 89 deletions
diff --git a/scripts/portdupe b/scripts/portdupe
new file mode 100755
index 000000000..fd03f8438
--- /dev/null
+++ b/scripts/portdupe
@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# Copyright 2006 David Shakaryan <omp@gentoo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+PORTDIR="$(portageq envvar PORTDIR)"
+
+# If an argument is present, use it as the overlay directory.
+if [ $1 ]; then
+ cd ${1}
+fi
+
+# Checking, displaying, etc.
+for PACKAGE in */*; do
+ if [[ -d ${PORTDIR}/${PACKAGE} ]] && [[ $(basename ${PACKAGE}) != "CVS" ]] && grep -q $(dirname ${PACKAGE}) ${PORTDIR}/profiles/categories; then
+ # Reset versions from last package checked.
+ PORTPACK_VERS=""
+ OVERPACK_VERS=""
+ # Find just package name excluding category.
+ PACKAGE_BASE="`basename ${PACKAGE}`"
+ # Find versions of package in portage.
+ for PORTPACK in `ls ${PORTDIR}/${PACKAGE}/*.ebuild | sed -e 's/.ebuild//'`; do
+ PORTPACK_VER="`basename ${PORTPACK} | sed s/${PACKAGE_BASE}-//`"
+ PORTPACK_VERS="${PORTPACK_VERS} ${PORTPACK_VER}"
+ done
+ # Find versions of package in overlay.
+ for OVERPACK in `ls ${PACKAGE}/*.ebuild | sed -e 's/.ebuild//'`; do
+ OVERPACK_VER="`basename ${OVERPACK} | sed s/${PACKAGE_BASE}-//`"
+ OVERPACK_VERS="${OVERPACK_VERS} ${OVERPACK_VER}"
+ done
+ # Output info with colors.
+ echo -e "\e[1;33m${PACKAGE}\e[0m"
+ echo -e " \e[1;35mPortage:\e[0m${PORTPACK_VERS}"
+ echo -e " \e[1;35mOverlay:\e[0m${OVERPACK_VERS}"
+ fi
+done
diff --git a/scripts/stage-blast-db b/scripts/stage-blast-db
deleted file mode 100644
index e3722cfee..000000000
--- a/scripts/stage-blast-db
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-DATE=$(date "+%Y%m%d")
-CHANGE_ENTRY="automatic bump"
-
-# 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.ncbi.nlm.nih.gov/blast/docs/update_blastdb.pl >& /dev/null
-
-# Ask for which database
-
-echo "Which db should be updated ?"
-echo ""
-perl -w update_blastdb.pl --passiv --showall
-echo ""
-read DB
-
-
-# Fetch the database and rename it
-
-perl -w update_blastdb.pl --passiv ${DB}
-
-for mydb in ${DB}*; do
- mv ${mydb} ${mydb#.tar.gz}-${DATE}.tar.gz
-done
-
-cd ${REPO_DOC}/../sci-libs/blast-db-${DB};
-git mv blast-db-${DB}*ebuild blast-db-${DB}-${DATE}.ebuild
-git add .
-echangelog "${CHANGE_ENTRY}"
-reapoman -d -v fix
-git add .
-
diff --git a/scripts/update-monomers-db b/scripts/update-monomers-db
deleted file mode 100644
index 28e30333c..000000000
--- a/scripts/update-monomers-db
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-DATE=$(date "+%y%m%d")
-CHANGE_ENTRY="automatic bump"
-MIRROR=
-TMPDIR="/tmp/${USER}/"
-
-# 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 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/
- [[ -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}"
-}
-
-mkdir ${TMPDIR}
-cd ${TMPDIR};
-
-wget http://www.ysbl.york.ac.uk/~garib/refmac/data/refmac_dictionary.tar.gz
-
-SHA_NEW=$(sha256sum refmac_dictionary.tar.gz|awk '{print $1}')
-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
- echo ${SHA_OLD}
- echo ${SHA_NEW}
-fi