Created
September 9, 2015 03:08
-
-
Save omsai/e03c7d7f3afea4bc2957 to your computer and use it in GitHub Desktop.
My shitty script to update Micro-Manager release on GNU/Linux. Better is: https://micro-manager.org/wiki/How_To_Build_Micro_Manager_From_Source_On_Ubuntu_13.10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| # Update to the latest Micro-Manager release. | |
| # | |
| # - Download and unpack the source tarball from GitHub mirror. | |
| # - Update 3rdpartypublic svn repo. | |
| # - Unpack ImageJ to new versioned directory. | |
| # - Compile and install Micro-Manager to the ImageJ directory. | |
| # Read the current release version | |
| SNAPSHOT=$(curl https://raw.githubusercontent.com/mdcurtis/micromanager-upstream/master/version.txt) | |
| RELEASE=${SNAPSHOT:0:4}$(expr ${SNAPSHOT:4} - 1) | |
| MMDIR=micromanager-upstream-$RELEASE | |
| # Check if the current release is installed | |
| if [ -d $RELEASE ] | |
| then | |
| echo "Version $RELEASE already exists" >&2 | |
| exit 1 | |
| fi | |
| # Download MM tarball | |
| wget https://github.com/mdcurtis/micromanager-upstream/archive/${RELEASE}.tar.gz | |
| # Unpack MM | |
| tar -xvpf ${RELEASE}.tar.gz | |
| # Unpack ImageJ | |
| unzip -K ij148.zip | |
| # Rename ImageJ directory as mm installation version | |
| mv ImageJ $RELEASE | |
| # Update 3rdpartypublic | |
| ( cd 3rdpartypublic && svn up ) | |
| # Compile MM | |
| cd $MMDIR | |
| ./autogen.sh | |
| ./configure \ | |
| --prefix=$(dirname $(pwd))/$RELEASE \ | |
| --enable-imagej-plugin=$(dirname $(pwd))/$RELEASE \ | |
| --with-python | |
| make fetchdeps | |
| make -j5 | |
| # Install MM | |
| make install | |
| cd .. | |
| cd $RELEASE | |
| ./mmimagej |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment