detect Shell to be used as shebang for profile, exec and dbg scripts

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2020-01-13 18:38:05 +00:00
parent 3853527712
commit d1f88e634f
4 changed files with 9 additions and 3 deletions

View file

@ -82,6 +82,12 @@ elseif(CMAKE_HOST_SYSTEM_PROCESSOR)
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" KATIE_PROCESSOR)
endif()
# used as shebang for profile, exec and dbg scripts
find_program(KATIE_SHELL NAMES sh dash mksh ksh ash)
if(NOT KATIE_SHELL)
message(FATAL_ERROR "Could not detect shell, supported are: sh, dash, mksh, ksh and ash")
endif()
# components and tools that will be build, changed depending on the requirements availability
# NOTE: excluding DesignerComponents as it was never used as public component, currently only
# used by the the designer tool. if it is ever needed for something it can just be added here

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!@KATIE_SHELL@
set -e

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!@KATIE_SHELL@
set -e

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!@KATIE_SHELL@
# NOTE: safe as in does not append if already in the variable
safe_path_append() {