mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Try to detect seq versions installed by earlier fish versions and replace them
darcs-hash:20061103131621-ac50b-2748c958f8614f39fbaa7a45261877a912de539e.gz
This commit is contained in:
parent
49e300d0ca
commit
8aac7e82c0
1 changed files with 23 additions and 0 deletions
23
configure.ac
23
configure.ac
|
@ -147,6 +147,29 @@ AC_PROG_INSTALL
|
|||
AC_CHECK_PROG( SEQ_FALLBACK, seq, [ ], [seq])
|
||||
|
||||
|
||||
if test "$SEQ_FALLBACK"; then
|
||||
|
||||
#
|
||||
# We already have seq. Check if the seq version is installed by an
|
||||
# earlier fish version. If it is, we'll replace it.
|
||||
#
|
||||
|
||||
file=`which seq`
|
||||
if test -f "$file"; then
|
||||
|
||||
AC_MSG_CHECKING([if seq comes from a previous fish version])
|
||||
shebang=`grep "\(^#!/.*/fish\|^#!/usr/bin/env fish\)" $file`
|
||||
|
||||
if test "$shebang"; then
|
||||
AC_SUBST( SEQ_FALLBACK, seq )
|
||||
AC_MSG_RESULT(yes, replace it)
|
||||
else
|
||||
AC_MSG_RESULT(no, keep it)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Optionally drop xsel command
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue