File: ec2Dispatch

package info (click to toggle)
qiime 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 29,704 kB
  • sloc: python: 77,837; haskell: 379; sh: 113; makefile: 103
file content (12 lines) | stat: -rwxr-xr-x 257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# $Id$
echo $* >> /tmp/dispatch
N="$1"
DEST=`sed "${N}q;d" < ~/hosts.slave`
shift
if [ $DEST != "localhost" ]
then
    exec ssh -i ~/.ssh/cluster.pem $DEST "cd ~/sandbox; export PATH=$PATH; export PYTHONPATH=$PYTHONPATH; $*"
else
    exec $*
fi