From: Michael Orlitzky Date: Tue, 14 Jan 2020 22:23:28 +0000 (-0500) Subject: compilation: don't source unreadable files. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=bash.d.git;a=commitdiff_plain;h=00c01a9c888728fba782c94db5baefbebb9386f1 compilation: don't source unreadable files. --- diff --git a/compilation b/compilation index 5a1582b..ecc3dac 100644 --- a/compilation +++ b/compilation @@ -12,7 +12,9 @@ load_profile_defaults() { fi if [ -f "${profile}/make.defaults" ]; then - . "${profile}/make.defaults" + if [ -r "${profile}/make.defaults" ]; then + . "${profile}/make.defaults" + fi fi } @@ -22,7 +24,9 @@ load_profile_defaults /etc/portage/make.profile # and from make.conf, allowing the values in make.conf to override the # ones in the profile. if [ -f /etc/portage/make.conf ]; then - . /etc/portage/make.conf + if [ -r /etc/portage/make.conf ]; then + . /etc/portage/make.conf + fi fi # These are really the only variables that make sense to export to