mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-23 16:30:13 +00:00
config/functions: improve error message when there in not a device directory
This commit is contained in:
parent
61c5af1a60
commit
5c6663237e
@ -767,8 +767,15 @@ check_project() {
|
|||||||
|
|
||||||
check_device() {
|
check_device() {
|
||||||
local dashes="===========================" device_err_msg
|
local dashes="===========================" device_err_msg
|
||||||
if [ \( -z "${DEVICE}" -a -d "${PROJECT_DIR}/${PROJECT}/devices" \) -o \
|
if [ -n "${DEVICE}" -a ! -d "${PROJECT_DIR}/${PROJECT}/devices" ]; then
|
||||||
\( -n "${DEVICE}" -a ! -d "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}" \) ]; then
|
device_err_msg="\n $dashes$dashes$dashes"
|
||||||
|
device_err_msg+="\n ERROR: You must not specify DEVICE for the $PROJECT project"
|
||||||
|
device_err_msg+="\n $dashes$dashes$dashes"
|
||||||
|
device_err_msg+="\n\n There are no devices for project: ${PROJECT}"
|
||||||
|
|
||||||
|
die "${device_err_msg}"
|
||||||
|
elif [ \( -z "${DEVICE}" -a -d "${PROJECT_DIR}/${PROJECT}/devices" \) -o \
|
||||||
|
\( -n "${DEVICE}" -a ! -d "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}" \) ]; then
|
||||||
device_err_msg="\n ${dashes}${dashes}${dashes}"
|
device_err_msg="\n ${dashes}${dashes}${dashes}"
|
||||||
device_err_msg+="\n ERROR: Specify a valid device for the ${PROJECT} project"
|
device_err_msg+="\n ERROR: Specify a valid device for the ${PROJECT} project"
|
||||||
device_err_msg+="\n ${dashes}${dashes}${dashes}"
|
device_err_msg+="\n ${dashes}${dashes}${dashes}"
|
||||||
|
Loading…
Reference in New Issue
Block a user