Skip to content

Commit

Permalink
POSIX-compatible command testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed May 21, 2024
1 parent cbaae60 commit 44c0930
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module MiGA
# - String indicating release status:
# - rc* release candidate, not released as gem
# - [0-9]+ stable release, released as gem
VERSION = [1.3, 15, 2].freeze
VERSION = [1.3, 15, 3].freeze

##
# Nickname for the current major.minor version.
Expand Down
2 changes: 1 addition & 1 deletion scripts/miga.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function exists { [[ -e "$1" ]] ; }
function fx_exists { [[ $(type -t "$1") == "function" ]] ; }

# Override gzip with pigz (if available)
if which -s pigz ; then
if command -v pigz &>/dev/null ; then
function gzip { pigz -p ${CORES:-2} "$@" ; }
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/trimmed_reads.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FastQ.tag.rb -i "$in1" -p "$b-" -s "/1" -o "$b.1.fastq.gz"

# Multitrim
CMD="multitrim.py --level 9 --threads $CORES -o $b"
which -s pigz && CMD="$CMD --zip pigz"
command -v pigz &>/dev/null && CMD="$CMD --zip pigz"
if [[ -s "$b.2.fastq.gz" ]] ; then
# Paired
$CMD -1 "$b.1.fastq.gz" -2 "$b.2.fastq.gz"
Expand Down

0 comments on commit 44c0930

Please sign in to comment.