mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-22 01:50:44 -06:00
fix: make /bin/bash the default shell
This commit is contained in:
parent
5f593e35c8
commit
c85f5f8103
4 changed files with 13 additions and 13 deletions
|
@ -31,3 +31,6 @@ _update-task.mk:
|
||||||
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
||||||
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
||||||
export MAKEFILE_LIST
|
export MAKEFILE_LIST
|
||||||
|
ifndef INHERIT_SHELL
|
||||||
|
SHELL := /bin/bash
|
||||||
|
endif
|
||||||
|
|
|
@ -10,3 +10,4 @@ HELP_SEP ?= │
|
||||||
# python f-string literals
|
# python f-string literals
|
||||||
EPILOG ?=
|
EPILOG ?=
|
||||||
USAGE ?={ansi.$(HEADER_STYLE)}usage{ansi.end}:\n make <recipe>\n
|
USAGE ?={ansi.$(HEADER_STYLE)}usage{ansi.end}:\n make <recipe>\n
|
||||||
|
INHERIT_SHELL ?=
|
||||||
|
|
|
@ -2,15 +2,11 @@
|
||||||
#% block name %#quit_make#% endblock %#
|
#% block name %#quit_make#% endblock %#
|
||||||
#% block script %#
|
#% block script %#
|
||||||
|
|
||||||
import os, signal, sys
|
import os, signal
|
||||||
|
|
||||||
|
|
||||||
def quit_make():
|
def quit_make():
|
||||||
old_stdout = sys.stdout
|
|
||||||
with open(os.devnull, "w") as f:
|
|
||||||
sys.stdout = f
|
|
||||||
os.kill(os.getppid(), signal.SIGQUIT)
|
os.kill(os.getppid(), signal.SIGQUIT)
|
||||||
sys.stdout = old_stdout
|
|
||||||
|
|
||||||
|
|
||||||
#% endblock %#
|
#% endblock %#
|
||||||
|
|
12
task.mk
12
task.mk
|
@ -1,7 +1,7 @@
|
||||||
# }> [github.com/daylinmorgan/task.mk] <{ #
|
# }> [github.com/daylinmorgan/task.mk] <{ #
|
||||||
# Copyright (c) 2022 Daylin Morgan
|
# Copyright (c) 2022 Daylin Morgan
|
||||||
# MIT License
|
# MIT License
|
||||||
# version: v22.9.19-4-g071f7fc-dev
|
# version: v22.9.19-5-g5f593e3-dev
|
||||||
#
|
#
|
||||||
# task.mk should be included at the bottom of your Makefile with `-include .task.mk`
|
# task.mk should be included at the bottom of your Makefile with `-include .task.mk`
|
||||||
# See below for the standard configuration options that should be set prior to including this file.
|
# See below for the standard configuration options that should be set prior to including this file.
|
||||||
|
@ -18,6 +18,7 @@ HELP_SEP ?= │
|
||||||
# python f-string literals
|
# python f-string literals
|
||||||
EPILOG ?=
|
EPILOG ?=
|
||||||
USAGE ?={ansi.$(HEADER_STYLE)}usage{ansi.end}:\n make <recipe>\n
|
USAGE ?={ansi.$(HEADER_STYLE)}usage{ansi.end}:\n make <recipe>\n
|
||||||
|
INHERIT_SHELL ?=
|
||||||
# ---- [builtin recipes] ---- #
|
# ---- [builtin recipes] ---- #
|
||||||
ifeq (help,$(firstword $(MAKECMDGOALS)))
|
ifeq (help,$(firstword $(MAKECMDGOALS)))
|
||||||
HELP_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
HELP_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||||
|
@ -51,6 +52,9 @@ _update-task.mk:
|
||||||
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
||||||
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
||||||
export MAKEFILE_LIST
|
export MAKEFILE_LIST
|
||||||
|
ifndef INHERIT_SHELL
|
||||||
|
SHELL := /bin/bash
|
||||||
|
endif
|
||||||
# ---- [python/bash script runner] ---- #
|
# ---- [python/bash script runner] ---- #
|
||||||
define _newline
|
define _newline
|
||||||
|
|
||||||
|
@ -322,11 +326,7 @@ else:
|
||||||
quit_make()
|
quit_make()
|
||||||
endef
|
endef
|
||||||
define quit_make_py
|
define quit_make_py
|
||||||
import os, signal, sys
|
import os, signal
|
||||||
def quit_make():
|
def quit_make():
|
||||||
old_stdout = sys.stdout
|
|
||||||
with open(os.devnull, "w") as f:
|
|
||||||
sys.stdout = f
|
|
||||||
os.kill(os.getppid(), signal.SIGQUIT)
|
os.kill(os.getppid(), signal.SIGQUIT)
|
||||||
sys.stdout = old_stdout
|
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue