diff options
author | Alan Pearce | 2017-02-22 11:19:43 +0100 |
---|---|---|
committer | Alan Pearce | 2017-02-22 11:19:43 +0100 |
commit | 88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3 (patch) | |
tree | c52cf3650012fa14b2fd6f42f947ad37465b6d28 /hooks | |
parent | dbb463c35e132c609f53047b0de4a661d344f21a (diff) | |
download | dotfiles-88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3.tar.lz dotfiles-88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3.tar.zst dotfiles-88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3.zip |
rcup: Use `Emacs` command for building configuration if exists
`emacs` calls /usr/bin/emacs, which is too old. This relies on an Emacs application being added to $PATH
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/post-up/emacs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hooks/post-up/emacs b/hooks/post-up/emacs index cb9c091..53de6da 100755 --- a/hooks/post-up/emacs +++ b/hooks/post-up/emacs @@ -1,6 +1,8 @@ -#!/usr/bin/env zsh +#!/bin/sh -if [[ -s $commands[emacs] ]] +EMACS_COMMAND=$(which Emacs || which emacs) + +if [[ -s $EMACS_COMMAND ]] then pushd ~/.emacs.d emacs --batch --eval "(progn |