Browse Source

[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.
custom
Case Duckworth 5 years ago
committed by GitHub
parent
commit
079564cf17
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      utils/installer.sh

3
utils/installer.sh

@ -174,7 +174,8 @@ else
fi
### 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
printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n"
fi

Loading…
Cancel
Save