Skip to content

Commit

Permalink
Try to detect seq versions installed by earlier fish versions and rep…
Browse files Browse the repository at this point in the history
…lace them

darcs-hash:20061103131621-ac50b-2748c958f8614f39fbaa7a45261877a912de539e.gz
  • Loading branch information
liljencrantz committed Nov 3, 2006
1 parent 49e300d commit 8aac7e8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down

0 comments on commit 8aac7e8

Please sign in to comment.