Skip to content

Instantly share code, notes, and snippets.

@wasade
Created May 1, 2012 23:59
Show Gist options
  • Save wasade/2572500 to your computer and use it in GitHub Desktop.
Save wasade/2572500 to your computer and use it in GitHub Desktop.
version updater for biom-format
#!/bin/bash
OLD_VERSION=$1
NEW_VERSION=$2
cd trunk/examples
sed -ie "s/Biological Observation Matrix $OLD_VERSION/Biological Observation Matrix $NEW_VERSION/" *.biom
cd ../scripts
sed -ie "s/^__version__ = \"$OLD_VERSION\"/__version__ = \"$NEW_VERSION\"/" *.py
cd ../doc
sed -ie "s/^version = \"$OLD_VERSION\"/version = \"$NEW_VERSION\"/" conf.py
sed -ie "s/^release = \"$OLD_VERSION\"/version = \"$NEW_VERSION\"/" conf.py
cd documentation
sed -ie "s/\"format\": \"Biological Observation Matrix $OLD_VERSION\",/\"format\": \"Biological Observation Matrix $NEW_VERSION\",/" biom_format.rst
cd ../../python-code/biom
sed -ie "s/^__version__ = \"$OLD_VERSION\"/__version__ = \"$NEW_VERSION\"/" *.py
cd ../tests
sed -ie "s/^__version__ = \"$OLD_VERSION\"/__version__ = \"$NEW_VERSION\"/" *.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment