summaryrefslogtreecommitdiffstats
path: root/bin/newman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-15 02:23:43 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-15 02:23:43 +0000
commitf18540f507de4b434c0dfccbcea747654c32b431 (patch)
tree74217d628380712cbae387ffc27ad1ecd9138850 /bin/newman
parent420a428b6e59afd5e5743c8ac9b19a281410e9f1 (diff)
downloadportage-f18540f507de4b434c0dfccbcea747654c32b431.tar.gz
portage-f18540f507de4b434c0dfccbcea747654c32b431.tar.bz2
portage-f18540f507de4b434c0dfccbcea747654c32b431.zip
Fix new* and do* ebuild helpers to generate consistent error messages for
missing files and generate an appropriate QA Notice when such an error is detected in the build log. Thanks to Diego 'Flameeyes' Pettenò <flameeyes@g.o> for the suggestion. svn path=/main/trunk/; revision=11916
Diffstat (limited to 'bin/newman')
-rwxr-xr-xbin/newman5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/newman b/bin/newman
index 4ae4fdb7c..2d278aedd 100755
--- a/bin/newman
+++ b/bin/newman
@@ -8,6 +8,11 @@ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
exit 1
fi
+if [ ! -e "$1" ] ; then
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2
+ exit 1
+fi
+
rm -rf "${T}/${2}" && \
cp -f "${1}" "${T}/${2}" && \
exec doman "${T}/${2}"