summaryrefslogtreecommitdiff
path: root/bin/euse
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2010-04-11 18:07:15 +0000
committeridl0r <idl0r@gentoo.org>2010-04-11 18:07:15 +0000
commit139c622d4ca95eb219ea4657abb5f6dd0813377e (patch)
tree11a4eb13c1c61cc62798078c98c80e8a16ebc0a4 /bin/euse
parent631e83fae72be57069e269e89fcb0993129ecee9 (diff)
downloadgentoolkit-139c622d4ca95eb219ea4657abb5f6dd0813377e.tar.gz
euse: Fix check for /etc/make.profile.
Check if its readable and a directory instead of checking if its a link, thanks to Phillip Brink (ohnobinki) <ohnobinki@ohnopublishing.net>. svn path=/trunk/gentoolkit/; revision=772
Diffstat (limited to 'bin/euse')
-rwxr-xr-xbin/euse3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/euse b/bin/euse
index 023bfe4..ab8b932 100755
--- a/bin/euse
+++ b/bin/euse
@@ -68,11 +68,12 @@ check_sanity() {
local descdir
local make_defaults
+ [[ ! -d "${MAKE_PROFILE_PATH}" || ! -r "${MAKE_PROFILE_PATH}" ]] && error "${MAKE_PROFILE_PATH} is not readable"
+
descdir="$(get_portdir)/profiles"
[ ! -r "${MAKE_CONF_PATH}" ] && error "${MAKE_CONF_PATH} is not readable"
[ ! -r "${MAKE_GLOBALS_PATH}" ] && error "${MAKE_GLOBALS_PATH} is not readable"
- [ ! -h "${MAKE_PROFILE_PATH}" ] && error "${MAKE_PROFILE_PATH} is not a symlink"
[ -z "$(get_portdir)" ] && error "\$PORTDIR couldn't be determined"
[ ! -d "${descdir}" ] && error "${descdir} does not exist or is not a directory"
[ ! -r "${descdir}/use.desc" ] && error "${descdir}/use.desc is not readable"