summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2019-03-25 18:12:30 +0100
committerMichael Haubenwallner <haubi@gentoo.org>2019-03-25 18:16:52 +0100
commit032ef433319e81ca59fd4e064059fab3dc11bada (patch)
tree2554eec9cd8d0875fa096abb2e86198bfd2569c5
parentdrop app-portage/prefix-bootstrap, never was useful (diff)
downloadprefix-032ef433319e81ca59fd4e064059fab3dc11bada.tar.gz
prefix-032ef433319e81ca59fd4e064059fab3dc11bada.tar.bz2
prefix-032ef433319e81ca59fd4e064059fab3dc11bada.zip
bootstrap-prefix.sh: emerging prefix-toolkit if available
Still create /startprefix when app-portage/prefix-toolkit is not available in the tree. Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
-rwxr-xr-xscripts/bootstrap-prefix.sh35
1 files changed, 20 insertions, 15 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 94040d941d..7d6d808d87 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -607,22 +607,27 @@ bootstrap_startscript() {
eerror "automate starting your prefix, set SHELL and rerun this script" > /dev/stderr
return 1
fi
- einfo "Creating the Prefix start script (startprefix)"
- # currently I think right into the prefix is the best location, as
- # putting it in /bin or /usr/bin just hides it some more for the
- # user
- if is-rap ; then
- mkdir -p "${ROOT}"/usr/portage/scripts
- wget $([[ $(wget -h) == *"--no-check-certificate"* ]] && echo --no-check-certificate) \
- https://gitweb.gentoo.org/repo/proj/prefix.git/plain/scripts/startprefix.in \
- -O "${ROOT}"/usr/portage/scripts/startprefix.in
- fi
+ if [[ -d ${ROOT}/usr/portage/app-portage/prefix-toolkit ]] ; then
+ einfo "Finally, emerging prefix-toolkit for your convenience"
+ emerge -u app-portage/prefix-toolkit || return 1
+ else
+ einfo "Creating the Prefix start script (startprefix)"
+ # currently I think right into the prefix is the best location, as
+ # putting it in /bin or /usr/bin just hides it some more for the
+ # user
+ if is-rap ; then
+ mkdir -p "${ROOT}"/usr/portage/scripts
+ wget $([[ $(wget -h) == *"--no-check-certificate"* ]] && echo --no-check-certificate) \
+ https://gitweb.gentoo.org/repo/proj/prefix.git/plain/scripts/startprefix.in \
+ -O "${ROOT}"/usr/portage/scripts/startprefix.in
+ fi
- sed \
- -e "s|@GENTOO_PORTAGE_EPREFIX@|${ROOT}|g" \
- "${ROOT}"/usr/portage/scripts/startprefix.in \
- > "${ROOT}"/startprefix
- chmod 755 "${ROOT}"/startprefix
+ sed \
+ -e "s|@GENTOO_PORTAGE_EPREFIX@|${ROOT}|g" \
+ "${ROOT}"/usr/portage/scripts/startprefix.in \
+ > "${ROOT}"/startprefix
+ chmod 755 "${ROOT}"/startprefix
+ fi
einfo "To start Gentoo Prefix, run the script ${ROOT}/startprefix"
einfo "You can copy this file to a more convenient place if you like."