From 61e8df1a2912ba8a477c7b3f3a4e8565b821b7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Tue, 20 Oct 2009 13:29:57 +0000 Subject: [PATCH] Added a simple to use wrapper script for "run.pl". --- misc-scripts/id_mapping/myRun.ksh | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 misc-scripts/id_mapping/myRun.ksh diff --git a/misc-scripts/id_mapping/myRun.ksh b/misc-scripts/id_mapping/myRun.ksh new file mode 100755 index 0000000000..822ee37994 --- /dev/null +++ b/misc-scripts/id_mapping/myRun.ksh @@ -0,0 +1,55 @@ +#!/usr/bin/ksh + +scriptname=$0 + +function usage { + cat >&2 <<EOT +Usage: + ${scriptname} -c conf_file [ -m mode ] + + ... where 'conf_file' is the absolute path to the configuration file + to use for this stable ID mapping run, and 'mode' is either left out + (which is normally the case), or one of + + - check_only + - normal (default) + - mapping + - upload + +EOT +} + +if [[ ! -e ./run.pl ]]; then + print -u2 "Expected to find the following executable file here:" + print -u2 "\trun.pl" + exit +fi + +mode="normal" + +while getopts 'c:m:' opt; do + case ${opt} in + c) conf=${OPTARG} ;; + m) mode=${OPTARG} ;; + *) usage; exit ;; + esac +done + +if [[ -z ${conf} || -z ${mode} ]]; then + usage + exit +fi + +if [[ ! -f ${conf} ]]; then + print -u2 "The file '${conf}' does not exist." + exit +fi + +if [[ ${conf#/} == ${conf} ]]; then + print -u2 "The path '${conf}' is not absolute." + exit +fi + +./run.pl --lsf --conf=${conf} --logauto --mode=${mode} + +# $Id$ -- GitLab