]> gitweb.michael.orlitzky.com - bash.d.git/commitdiff
compilation: don't source unreadable files.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 14 Jan 2020 22:23:28 +0000 (17:23 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 14 Jan 2020 22:24:40 +0000 (17:24 -0500)
compilation

index 5a1582b40f08103f87e5bfb5c9f5595ef7ea9713..ecc3dac9b13c53e6efd2e363d84d728ad9b299bc 100644 (file)
@@ -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