Set PORTDIR separately in set_portdir.bash

This commit is contained in:
hasufell 2015-08-14 17:25:37 +02:00
parent 954b98f4e0
commit 8474f69819
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
6 changed files with 17 additions and 20 deletions

View File

@ -0,0 +1,12 @@
#!/bin/bash
# set PORTDIR
PORTDIR="$(cave print-repository-metadata --raw-name location gentoo)"
PORTDIR="${PORTDIR#location=}"
if [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] ; then
die "PORTDIR empty or pointing to root!"
elif [[ ! -e ${PORTDIR} ]] ; then
die "PORTDIR does not exist!"
fi

View File

@ -2,10 +2,7 @@
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
PORTDIR="/usr/portage"
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
source "/etc/paludis/hooks/set_portdir.bash"
einfo "syncing metadata cache"

View File

@ -2,10 +2,7 @@
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
PORTDIR="/usr/portage"
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
source "/etc/paludis/hooks/set_portdir.bash"
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"

View File

@ -2,10 +2,7 @@
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
PORTDIR="/usr/portage"
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
source "/etc/paludis/hooks/set_portdir.bash"
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"

View File

@ -2,10 +2,7 @@
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
PORTDIR="/usr/portage"
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
source "/etc/paludis/hooks/set_portdir.bash"
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"

View File

@ -2,10 +2,7 @@
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
PORTDIR="/usr/portage"
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
source "/etc/paludis/hooks/set_portdir.bash"
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"