mirror of
https://github.com/tmux/tmux.git
synced 2025-03-29 02:08:48 +00:00
Fix gseq use in RGB colour script.
This commit is contained in:
parent
5489796737
commit
2cecabd75e
@ -14,9 +14,23 @@
|
|||||||
# https://github.com/gnachman/iTerm2/blob/master/LICENSE
|
# https://github.com/gnachman/iTerm2/blob/master/LICENSE
|
||||||
#
|
#
|
||||||
|
|
||||||
if which gseq >/dev/null 2>&1
|
SEQ1=
|
||||||
then
|
if which gseq >/dev/null 2>&1; then
|
||||||
SEQ=gseq
|
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
|
else
|
||||||
SEQ=seq
|
SEQ=seq
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user