doins: put EPREFIX check next to ED check
authorFabian Groffen <grobian@gentoo.org>
Wed, 26 Jan 2011 20:02:39 +0000 (21:02 +0100)
committerFabian Groffen <grobian@gentoo.org>
Wed, 26 Jan 2011 20:02:39 +0000 (21:02 +0100)
for clarity, but also to avoid leaving behind stuff when calling with
EPREFIX

bin/ebuild-helpers/doins

index dd2bee9540d6800ff15dece2cd5dd27bc6840eec..882e19c631587269c0bb37c7a811dbf4ea8d5258 100755 (executable)
@@ -24,6 +24,13 @@ if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then
        helpers_die "${0##*/} used with \${D}"
        exit 1
 fi
+if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
+       vecho "-------------------------------------------------------" 1>&2
+       vecho "You should not use \${EPREFIX} with helpers." 1>&2
+       vecho "  --> ${INSDESTTREE}" 1>&2
+       vecho "-------------------------------------------------------" 1>&2
+       exit 1
+fi
 
 case "$EAPI" in
        0|1|2|3|3_pre2)
@@ -38,14 +45,6 @@ export TMP=$T/.doins_tmp
 # Use separate directories to avoid potential name collisions.
 mkdir -p "$TMP"/{1,2}
 
-if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
-       vecho "-------------------------------------------------------" 1>&2
-       vecho "You should not use \${EPREFIX} with helpers." 1>&2
-       vecho "  --> ${INSDESTTREE}" 1>&2
-       vecho "-------------------------------------------------------" 1>&2
-       exit 1
-fi
-
 [[ ! -d ${ED}${INSDESTTREE} ]] && dodir "${INSDESTTREE}"
 
 _doins() {