Skip to content

Commit

Permalink
Fix gseq use in RGB colour script.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Apr 28, 2019
1 parent 5489796 commit 2cecabd
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions tools/24-bit-color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,23 @@
# https://github.com/gnachman/iTerm2/blob/master/LICENSE
#

if which gseq >/dev/null 2>&1
then
SEQ=gseq
SEQ1=
if which gseq >/dev/null 2>&1; then
SEQ1=gseq
elif seq --version|grep -q GNU; then
SEQ1=seq
fi
if [ -n "$SEQ1" ]; then
# GNU seq requires a -ve increment if going backwards
seq1()
{
if [ $1 -gt $2 ]; then
$SEQ1 $1 -1 $2
else
$SEQ1 $1 $2
fi
}
SEQ=seq1
else
SEQ=seq
fi
Expand Down

0 comments on commit 2cecabd

Please sign in to comment.