parent
30988a9720
commit
29c661aa3e
1 changed files with 3 additions and 3 deletions
6
bin/doom
6
bin/doom
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
:; # -*- mode: emacs-lisp; lexical-binding: t -*-
|
:; # -*- mode: emacs-lisp; lexical-binding: t -*-
|
||||||
:; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
|
:; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
|
||||||
:; [ "$EMACS" = emacs ] && { type emacs >/dev/null 2>&1 || err=1; }
|
:; [ "x$EMACS" = xemacs ] && { type emacs >/dev/null 2>&1 || err=1; }
|
||||||
:; [ -n "$err" ] && { echo "Error: failed to run Emacs with command '$EMACS'"; echo; echo "Are you sure Emacs is installed and in your \$PATH?"; exit 1; } >&2
|
:; [ "x$err" = x ] || { echo "Error: failed to run Emacs with command '$EMACS'"; echo; echo "Are you sure Emacs is installed and in your \$PATH?"; exit 1; } >&2
|
||||||
:; emacs="$EMACS ${DEBUG:+--debug-init} -q --no-site-file --batch"
|
:; emacs="$EMACS ${DEBUG:+--debug-init} -q --no-site-file --batch"
|
||||||
:; export __DOOMPID="${__DOOMPID:-$$}"
|
:; export __DOOMPID="${__DOOMPID:-$$}"
|
||||||
:; export __DOOMSTEP="${__DOOMSTEP:-0}"
|
:; export __DOOMSTEP="${__DOOMSTEP:-0}"
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
:; export __DOOMGPIPE=${__DOOMGPIPE:-$__DOOMPIPE}
|
:; export __DOOMGPIPE=${__DOOMGPIPE:-$__DOOMPIPE}
|
||||||
:; export __DOOMPIPE=; [ -t 0 ] || __DOOMPIPE="${__DOOMPIPE}0"; [ -t 1 ] || __DOOMPIPE="${__DOOMPIPE}1"
|
:; export __DOOMPIPE=; [ -t 0 ] || __DOOMPIPE="${__DOOMPIPE}0"; [ -t 1 ] || __DOOMPIPE="${__DOOMPIPE}1"
|
||||||
:; $emacs --load "$0" -- "$@" || exit=$?
|
:; $emacs --load "$0" -- "$@" || exit=$?
|
||||||
:; [ "${exit:-0}" -eq 254 ] && { export TMPDIR="${TMPDIR:-${TEMP:-`$emacs -Q --eval '(princ (temporary-file-directory))' 2>/dev/null`}}"; sh "${TMPDIR}/doom.${__DOOMPID}.${__DOOMSTEP}.sh" "$0" "$@" && true; exit="$?"; }
|
:; [ "${exit:-0}" -eq 254 ] && { export TMPDIR="${TMPDIR:-${TMP:-${TEMP:-`$emacs -Q --eval '(princ temporary-file-directory)' 2>/dev/null`}}}"; sh "${TMPDIR}/doom.${__DOOMPID}.${__DOOMSTEP}.sh" "$0" "$@" && true; exit="$?"; }
|
||||||
:; exit $exit
|
:; exit $exit
|
||||||
|
|
||||||
;; This magical mess of a shebang is necessary for any script that relies on
|
;; This magical mess of a shebang is necessary for any script that relies on
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue