diff options
author | Mike Gilbert <floppym@gentoo.org> | 2014-03-16 23:46:28 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-03-16 23:46:28 -0400 |
commit | c42cf6d80aa2e5f9faef11913134c15af20d0664 (patch) | |
tree | 37e03bbf68e7414a4f451a168c58c7b1d010d802 | |
parent | Bump to version 0.12. (diff) | |
download | python-updater-c42cf6d80aa2e5f9faef11913134c15af20d0664.tar.gz python-updater-c42cf6d80aa2e5f9faef11913134c15af20d0664.tar.bz2 python-updater-c42cf6d80aa2e5f9faef11913134c15af20d0664.zip |
Source /etc/init.d/functions.sh as a fallback.
-rw-r--r-- | python-updater.in | 9 |
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" |