Merge pull request #1460 from Provessor/posix-compliance
Posix compliance
This commit is contained in:
commit
69a8e15d8f
4 changed files with 13 additions and 13 deletions
16
bin/doom
16
bin/doom
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
":"; [[ $EMACS = *"term"* ]] && EMACS=emacs || EMACS=${EMACS:-emacs} # -*-emacs-lisp-*-
|
":"; ( 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; }
|
":"; command -v $EMACS >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; }
|
||||||
":"; VERSION=$($EMACS --version | head -n1)
|
":"; VERSION=$($EMACS --version | head -n1)
|
||||||
":"; [[ $VERSION == *\ 2[0-2].[0-1].[0-9] ]] && { echo "You're running $VERSION"; echo "That version is too old to run Doom. Check your PATH"; echo; exit 2; }
|
":"; case "$VERSION" in *\ 2[0-2].[0-1].[0-9]) echo "You're running $VERSION"; echo "That version is too old to run Doom. Check your PATH"; echo; exit 2 ;; esac
|
||||||
":"; DOOMBASE=$(dirname "${BASH_SOURCE:-${(%):-%x}}")/..
|
":"; DOOMBASE=$(dirname "$0")/..
|
||||||
":"; [[ $1 == -d || $1 == --debug ]] && { shift; export DEBUG=1; }
|
":"; [ "$1" = -d ] || [ "$1" = --debug ] && { shift; export DEBUG=1; }
|
||||||
":"; [[ $1 == doc || $1 == doctor ]] && { cd "$DOOMBASE"; shift; exec $EMACS --script bin/doom-doctor "$@"; exit 0; }
|
":"; [ "$1" = doc ] || [ "$1" = doctor ] && { cd "$DOOMBASE"; shift; exec $EMACS --script bin/doom-doctor "$@"; exit 0; }
|
||||||
":"; [[ $1 == run ]] && { cd "$DOOMBASE"; shift; exec $EMACS -q --no-splash -l bin/doom "$@"; exit 0; }
|
":"; [ "$1" = run ] && { cd "$DOOMBASE"; shift; exec $EMACS -q --no-splash -l bin/doom "$@"; exit 0; }
|
||||||
":"; exec $EMACS --script "$0" -- $@
|
":"; exec $EMACS --script "$0" -- "$@"
|
||||||
":"; exit 0
|
":"; exit 0
|
||||||
|
|
||||||
(defun usage ()
|
(defun usage ()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } # -*-emacs-lisp-*-
|
":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } # -*-emacs-lisp-*-
|
||||||
":"; VERSION=$(emacs --version | head -n1)
|
":"; VERSION=$(emacs --version | head -n1)
|
||||||
":"; [[ $VERSION == *\ 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; }
|
":"; 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
|
||||||
":"; exec emacs --quick --script "$0"; exit 0
|
":"; exec emacs --quick --script "$0"; exit 0
|
||||||
|
|
||||||
;; The Doom doctor is essentially one big, self-contained elisp shell script
|
;; The Doom doctor is essentially one big, self-contained elisp shell script
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Open an org-capture popup frame from the shell. This opens a temporary emacs
|
# Open an org-capture popup frame from the shell. This opens a temporary emacs
|
||||||
# daemon if emacs isn't already running.
|
# daemon if emacs isn't already running.
|
||||||
|
@ -30,7 +30,7 @@ shift $((OPTIND-1))
|
||||||
|
|
||||||
[ -t 0 ] && str="$*" || str=$(cat)
|
[ -t 0 ] && str="$*" || str=$(cat)
|
||||||
|
|
||||||
if [[ $daemon ]]; then
|
if [ $daemon ]; then
|
||||||
emacsclient -a "" \
|
emacsclient -a "" \
|
||||||
-c -F '((name . "org-capture") (width . 70) (height . 25) (transient . t))' \
|
-c -F '((name . "org-capture") (width . 70) (height . 25) (transient . t))' \
|
||||||
-e "(+org-capture/open-frame \"$str\" ${key:-nil})"
|
-e "(+org-capture/open-frame \"$str\" ${key:-nil})"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-
|
":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-
|
||||||
;;; bin/org-tangle
|
;;; bin/org-tangle
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue