commit:     c42cf6d80aa2e5f9faef11913134c15af20d0664
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 17 03:46:28 2014 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Mar 17 03:46:28 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/python-updater.git;a=commit;h=c42cf6d8

Source /etc/init.d/functions.sh as a fallback.

---
 python-updater.in | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/python-updater.in b/python-updater.in
index f079316..2e5de5b 100644
--- a/python-updater.in
+++ b/python-updater.in
@@ -62,7 +62,14 @@ CHECK_SHARED_LINKING="1"
 CHECK_STATIC_LINKING="1"
 
 # Load the Gentoo-style info macros
-. "@GENTOO_PORTAGE_EPREFIX@"/lib/gentoo/functions.sh
+if [[ -e "@GENTOO_PORTAGE_EPREFIX@"/lib/gentoo/functions.sh ]]; then
+    . "@GENTOO_PORTAGE_EPREFIX@"/lib/gentoo/functions.sh
+elif [[ -e "@GENTOO_PORTAGE_EPREFIX@"/etc/init.d/functions.sh ]]; then
+    . "@GENTOO_PORTAGE_EPREFIX@"/etc/init.d/functions.sh
+else
+    echo "Unable to find functions.sh"
+    exit 1
+fi
 
 # Portage variables.
 PKG_DBDIR="@GENTOO_PORTAGE_EPREFIX@/var/db/pkg"

Reply via email to