diff options
Diffstat (limited to 'personal/setup')
| -rw-r--r-- | personal/setup/emacs.md | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/personal/setup/emacs.md b/personal/setup/emacs.md index d7abc49..53fb75f 100644 --- a/personal/setup/emacs.md +++ b/personal/setup/emacs.md @@ -21,14 +21,16 @@ fi check-config () { - local define=$(grep EMACS_CONFIG_OPTIONS src/config.h) - local pattern='^#define EMACS_CONFIG_OPTIONS "(.+)"$' + if ! test -f src/config.h + then + return 1 + fi - [[ ${define} =~ ${pattern} ]] - test "${BASH_REMATCH[1]}" = "${CONFIGURE_FLAGS}" + local pattern='#define EMACS_CONFIG_OPTIONS "'${CONFIGURE_FLAGS}'"' + grep "${pattern}" src/config.h } -if ! test -f src/config.h || ! check-config +if ! check-config then ./configure ${CONFIGURE_FLAGS} fi |
