mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
support/dependencies: check PATH does not carry a \n
... otherwise it fails spectacularly as soon as PATH is referenced in a package rule (i.e. very soon, fortunately): >>> host-lzip 1.18 Downloading /bin/bash: -c: line 0: unexpected EOF while looking for matching `"' /bin/bash: -c: line 1: syntax error: unexpected end of file Fixes # 9886. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ciro Santilli <ciro.santilli@gmail.com> [Thomas: fix typo in message, use tabs for indentation.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
4cb4ab5cf9
commit
f00d6ec67b
@ -29,6 +29,18 @@ if test -n "$LD_LIBRARY_PATH" ; then
|
|||||||
fi
|
fi
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
# PATH should not contain a newline, otherwise it fails in spectacular ways
|
||||||
|
# as soon as PATH is referenced in a package rule
|
||||||
|
case "${PATH}" in
|
||||||
|
(*"
|
||||||
|
"*) printf "\n"
|
||||||
|
# Break the '\n' sequence, or a \n is printed (which is not what we want).
|
||||||
|
printf "Your PATH contains a newline (%sn) character.\n" "\\"
|
||||||
|
printf "This doesn't work. Fix you PATH.\n"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# sanity check for CWD in PATH. Having the current working directory
|
# sanity check for CWD in PATH. Having the current working directory
|
||||||
# in the PATH makes the toolchain build process break.
|
# in the PATH makes the toolchain build process break.
|
||||||
# try not to rely on egrep..
|
# try not to rely on egrep..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user