Skip to content
Snippets Groups Projects
Commit 628e91a3 authored by Libreboot project's avatar Libreboot project Committed by Leah Rowe
Browse files

build: further prevent non-cbmk-work-directory


this is a follow-up to the previous commit

again, there's no posix way to check the path to the
file at argument 0, because readlink (utility) isn't
defined in posix (the C function is defined, but not
the utility included on many unices)

check whether "build" (file) exists, and whether it
is a symlink; if the latter, then we are definitely
not in the cbmk work directory!

Signed-off-by: default avatarLeah Rowe <leah@libreboot.org>
parent e761a494
Branches
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
set -u -e set -u -e
if [ "./${0##*/}" != "${0}" ]; then if [ "./${0##*/}" != "${0}" ] || [ ! -f "build" ] || [ -L "build" ]; then
printf "You must run this in the cbmk work directory.\n" 1>&2 printf "You must run this in the cbmk work directory.\n" 1>&2
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment