Improve patch-macos wrapper script

Reported to produce better results.
This commit is contained in:
Henrik Lissner 2018-08-29 23:01:59 +02:00
parent 48948f725f
commit 0fc9b6be91
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -391,10 +391,10 @@ packages and regenerates the autoloads file."
(unless (file-exists-p newbin)
(error "Failed to copy %s to %s" oldbin newbin))
(with-temp-buffer
(insert "#!/usr/bin/env bash\n"
(insert "#!/bin/bash\n"
"args=\"$@\"\n"
"pwd=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\"; pwd -P)\"\n"
"exec \"$SHELL\" -c \"$pwd/RunEmacs $args\"")
"exec \"$SHELL\" -l -c \"$pwd/RunEmacs $args\"")
(write-file oldbin)
(chmod oldbin (file-modes newbin)))
(message "%s successfully patched" appdir)))))