diff options
| author | jvoisin | 2016-01-04 16:18:44 +0100 |
|---|---|---|
| committer | jvoisin | 2016-01-04 16:18:44 +0100 |
| commit | 8f2560344f84b6cac651d7dc73ff327af23ac65d (patch) | |
| tree | 1929a5462d606f26a7b46c91a83ebae9306f34d8 | |
| parent | a16310d442a72cd50f6eb7f1f493988f8a87a2f3 (diff) | |
Add `-t` to specify the number of threads to use
| -rwxr-xr-x | phpmalwarefinder | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpmalwarefinder b/phpmalwarefinder index c49a7bd..354ab91 100755 --- a/phpmalwarefinder +++ b/phpmalwarefinder | |||
| @@ -33,12 +33,13 @@ Usage ${0##*/} [-cfhw] <file|folder> ... | |||
| 33 | -c Optional path to a configuration file | 33 | -c Optional path to a configuration file |
| 34 | -f Fast mode | 34 | -f Fast mode |
| 35 | -h Show this help message | 35 | -h Show this help message |
| 36 | -t Specify the number of threads to use (8 by default) | ||
| 36 | -v Verbose mode | 37 | -v Verbose mode |
| 37 | EOF | 38 | EOF |
| 38 | } | 39 | } |
| 39 | 40 | ||
| 40 | OPTIND=1 | 41 | OPTIND=1 |
| 41 | while getopts "c:fhv" opt; do | 42 | while getopts "c:fht:v" opt; do |
| 42 | case "$opt" in | 43 | case "$opt" in |
| 43 | h) | 44 | h) |
| 44 | show_help | 45 | show_help |
| @@ -50,6 +51,9 @@ while getopts "c:fhv" opt; do | |||
| 50 | c) | 51 | c) |
| 51 | CONFIG_PATH=${OPTARG} | 52 | CONFIG_PATH=${OPTARG} |
| 52 | ;; | 53 | ;; |
| 54 | t) | ||
| 55 | OPTS="${OPTS} --threads=${OPTARG}" | ||
| 56 | ;; | ||
| 53 | v) | 57 | v) |
| 54 | OPTS="${OPTS} -s" | 58 | OPTS="${OPTS} -s" |
| 55 | ;; | 59 | ;; |
