diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2016-11-09 11:06:46 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2016-11-09 11:06:46 +0100 |
commit | e9c2acd3fdd4e239c3d78b289351a263628c2d74 (patch) | |
tree | 5cc15f208cf6679791f48588a26cdf49c8fa784d /dev-util | |
parent | af2cc8fcb9f81284216f53841d8ff491c967840f (diff) | |
download | gentoo-e9c2acd3fdd4e239c3d78b289351a263628c2d74.tar.gz gentoo-e9c2acd3fdd4e239c3d78b289351a263628c2d74.tar.xz |
dev-util/debugedit: Added some checks to the update script.
Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-util')
-rwxr-xr-x | dev-util/debugedit/files/update.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/dev-util/debugedit/files/update.sh b/dev-util/debugedit/files/update.sh index db5495d41eb..3fed29ad6dc 100755 --- a/dev-util/debugedit/files/update.sh +++ b/dev-util/debugedit/files/update.sh @@ -1,9 +1,22 @@ #!/bin/bash -DISTDIR=/usr/portage/distfiles +DISTDIR="$(portageq envvar DISTDIR 2>/dev/null)" +DISTDIR="${DISTDIR:-/usr/portage/distfiles}" +if [[ ! -d "${DISTDIR}" ]] ; then + echo "No DISTDIR found." + exit 1 +fi + PN=debugedit -. /etc/init.d/functions.sh +gentoo_functions="/lib/gentoo/functions.sh" +if [[ -f "${gentoo_functions}" ]] ; then + . "${gentoo_functions}" +else + echo "Failed to source ${gentoo_functions} file." + echo "Please install sys-apps/gentoo-functions package." + exit 1 +fi set -e |