From 9236999df161214d72cc46acce9d1389dfc369d3 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sat, 8 Jun 2019 07:13:19 +0200 Subject: [PATCH 1/3] fix shebang --- bin/doom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/doom b/bin/doom index f2aab55c8..571a84a3e 100755 --- a/bin/doom +++ b/bin/doom @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh ":"; ( echo "$EMACS" | grep -q "term" ) && EMACS=emacs || EMACS=${EMACS:-emacs} # -*-emacs-lisp-*- ":"; command -v $EMACS >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } ":"; VERSION=$($EMACS --version | head -n1) From 5a380e9db2ce72fcbe614953baa00a6d1ce3e6dd Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sat, 8 Jun 2019 07:27:36 +0200 Subject: [PATCH 2/3] fix shebang for doctor, org-capture and -tangle --- bin/doom-doctor | 2 +- bin/org-capture | 2 +- bin/org-tangle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/doom-doctor b/bin/doom-doctor index 004ba5728..c91c273d2 100755 --- a/bin/doom-doctor +++ b/bin/doom-doctor @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh ":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } # -*-emacs-lisp-*- ":"; VERSION=$(emacs --version | head -n1) ":"; case $VERSION in *\ 2[0-2].[0-1].[0-9]) echo "You're running $VERSION"; echo "That version is too old to run the doctor. Check your PATH"; echo; exit 2 ;; esac diff --git a/bin/org-capture b/bin/org-capture index 033604086..15d6f0a34 100755 --- a/bin/org-capture +++ b/bin/org-capture @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Open an org-capture popup frame from the shell. This opens a temporary emacs # daemon if emacs isn't already running. diff --git a/bin/org-tangle b/bin/org-tangle index 79f50e851..7323c513c 100755 --- a/bin/org-tangle +++ b/bin/org-tangle @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh ":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*- ;;; bin/org-tangle From 2631ca90d9754f292b1faab8309b6ce693b7a8bd Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sat, 8 Jun 2019 07:31:24 +0200 Subject: [PATCH 3/3] fix shebang for macos patch --- core/cli/patch-macos.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/patch-macos.el b/core/cli/patch-macos.el index 74c711dd1..91fbb5a79 100644 --- a/core/cli/patch-macos.el +++ b/core/cli/patch-macos.el @@ -18,7 +18,7 @@ This patch fixes this by patching Emacs.app (in /Applications or 1. Move Contents/MacOS/Emacs to Contents/MacOS/RunEmacs 2. And replace Contents/MacOS/Emacs with the following wrapper script: - #!/bin/bash + #!/user/bin/env bash args=\"$@\" pwd=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\"; pwd -P)\" exec \"$SHELL\" -l -c \"$pwd/RunEmacs $args\" @@ -79,7 +79,7 @@ depending on your shell configuration and isn't always reliable.") (unless (file-exists-p newbin) (error "Failed to copy %s to %s" oldbin newbin)) (with-temp-buffer - (insert "#!/bin/bash\n" + (insert "#!/usr/bin/env bash\n" "args=\"$@\"\n" "pwd=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\"; pwd -P)\"\n" "exec \"$SHELL\" -l -c \"$pwd/RunEmacs $args\"")