[Fix #1266] Improve Emacs version detection logic in the installer script
The fix is naive -- it'll work fine (printing a warning) if there is no emacs installed, but if emacs *is* installed and just formats the `--version` line differently than the pipeline is expecting, it'll also print the warning -- which isn't *ideal*, but should work in most cases.
This commit is contained in:
parent
a218bfe745
commit
079564cf17
1 changed files with 2 additions and 1 deletions
|
@ -174,7 +174,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Check emacs version
|
### Check emacs version
|
||||||
if [ $(emacs --version 2>/dev/null | sed -n 's/.*[^0-9.]\([0-9]*\.[0-9.]*\).*/\1/p;q' | sed 's/\..*//g') -lt 24 ]
|
emacs_version="$(emacs --version 2>/dev/null | sed -n 's/.*[^0-9.]\([0-9]*\.[0-9.]*\).*/\1/p;q' | sed 's/\..*//g')"
|
||||||
|
if [ "${emacs_version:-0}" -lt 24 ]
|
||||||
then
|
then
|
||||||
printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n"
|
printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue