Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion otp_build
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ check_erltop ()
echo "The environment variable ERL_TOP must be set." >&2
exit 1
fi
elif [ "X$1" != "Xtests" ]; then
real_ERL_TOP=`realpath $ERL_TOP`
real_PWD=`realpath $PWD`
if [ "X${real_PWD##$real_ERL_TOP*}" != "X" ]; then
echo "ERROR: Current working directory is not in ERL_TOP." >&2
echo "ERL_TOP=$ERL_TOP" >&2
echo "PWD=$PWD" >&2
exit 1
fi
fi
}

Expand Down Expand Up @@ -1351,7 +1360,7 @@ do_remove_prebuilt_files ()

# main

check_erltop
check_erltop $1

cd "$ERL_TOP"

Expand Down
Loading