summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python-updater.in9
1 files changed, 8 insertions, 1 deletions
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"