#!/bin/bash xmx=4g progname=SingleCellRnaSeqMetricsCollector jar_deploy_dir=`dirname $0`/jar USAGE=$(cat << EOF USAGE: $0 [-m ] program args... -m (default $xmx) To get help for the program rather than the script: $0 -- -h EOF ) function usage () { echo "$USAGE" >&2 } set -e while getopts ":m:" options; do case $options in m ) xmx=$OPTARG;; h ) usage exit 1;; \? ) usage exit 1;; * ) usage exit 1;; esac done shift $(($OPTIND - 1)) java -Xmx${xmx} -jar $jar_deploy_dir/dropseq.jar $progname $*