From 944e243c5d229b1c55c70dbe45a8259973415a8b Mon Sep 17 00:00:00 2001 From: Misaka Mikoto Date: Mon, 3 Jun 2019 21:17:53 +1000 Subject: [PATCH] bin/doom-doctor POSIX compliance --- bin/doom-doctor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/doom-doctor b/bin/doom-doctor index 44838d2a1..004ba5728 100755 --- a/bin/doom-doctor +++ b/bin/doom-doctor @@ -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-*- ":"; 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 ;; The Doom doctor is essentially one big, self-contained elisp shell script