File: check_command_line_arguments.patch

package info (click to toggle)
srst2 0.2.0-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,072 kB
  • sloc: python: 3,115; sh: 50; makefile: 25
file content (32 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Author: Andreas Tille <tille@debian.org>
Last-Update: 2015-12-07
Description: Check command line arguments before processing

--- a/database_clustering/get_all_vfdb.sh
+++ b/database_clustering/get_all_vfdb.sh
@@ -5,6 +5,11 @@
 #example usage:
 #/srst2/database_clustering/get_all_vfdb.sh ./CP_VFs.ffn ./VFDB
 
+if [ $# != 2 ] ; then
+  echo "Usage: `basename $0` <vfdbfile> <outputfolder>"
+  exit 1
+fi
+
 VFDBFILE=$(readlink -e $1)
 OUTPUTFOLDER=$2
 #get the srst2/database_clustering folder where all the other python scripts live side-by-side with this one
--- a/database_clustering/get_genus_vfdb.sh
+++ b/database_clustering/get_genus_vfdb.sh
@@ -4,6 +4,11 @@
 #example usage:
 #/srst2/database_clustering/get_genus_vfdb.sh ./CP_VFs.ffn Bacillus ./VFDB
 
+if [ $# != 3 ] ; then
+  echo "Usage: `basename $0` <vfdbfile> <genus> <outputfolder>"
+  exit 1
+fi
+
 VFDBFILE=$(readlink -e $1)
 GENUS=$2
 OUTPUTFOLDER=$3