summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-02-22 11:19:43 +0100
committerAlan Pearce2017-02-22 11:19:43 +0100
commit88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3 (patch)
treec52cf3650012fa14b2fd6f42f947ad37465b6d28
parentdbb463c35e132c609f53047b0de4a661d344f21a (diff)
downloadnixfiles-88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3.tar.lz
nixfiles-88a7c8f35fc9528aa655ad12bf1fe85a5571b5c3.tar.zst
nixfiles-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
-rwxr-xr-xhooks/post-up/emacs6
1 files changed, 4 insertions, 2 deletions
diff --git a/hooks/post-up/emacs b/hooks/post-up/emacs
index cb9c0916..53de6dad 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