diff --git a/etc/paludis/hooks/sync_all_post/sync_cache.bash b/etc/paludis/hooks/sync_all_post/sync_cache.bash index 4033fd8..f8b4acc 100644 --- a/etc/paludis/hooks/sync_all_post/sync_cache.bash +++ b/etc/paludis/hooks/sync_all_post/sync_cache.bash @@ -1,16 +1,12 @@ #!/bin/bash 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!" -die() { - eerror "${1}" - exit 1 -} - einfo "syncing metadata cache" egencache --jobs=8 --repo=gentoo --update --update-use-local-desc || die "egencache failed!" diff --git a/etc/paludis/hooks/sync_all_post/sync_dtd.bash b/etc/paludis/hooks/sync_all_post/sync_dtd.bash index 2a1b357..55b0867 100644 --- a/etc/paludis/hooks/sync_all_post/sync_dtd.bash +++ b/etc/paludis/hooks/sync_all_post/sync_dtd.bash @@ -1,17 +1,13 @@ #!/bin/bash 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!" -die() { - eerror "${1}" - exit 1 -} - cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" if [[ -e dtd ]] ; then einfo "dtd dir already exists, updating..." diff --git a/etc/paludis/hooks/sync_all_post/sync_glsa.bash b/etc/paludis/hooks/sync_all_post/sync_glsa.bash index 684e538..49b4961 100644 --- a/etc/paludis/hooks/sync_all_post/sync_glsa.bash +++ b/etc/paludis/hooks/sync_all_post/sync_glsa.bash @@ -1,17 +1,13 @@ #!/bin/bash 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!" -die() { - eerror "${1}" - exit 1 -} - cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" if [[ -e glsa ]] ; then einfo "glsa dir already exists, updating..." diff --git a/etc/paludis/hooks/sync_all_post/sync_herds_xml.bash b/etc/paludis/hooks/sync_all_post/sync_herds_xml.bash index 85ba769..f6b5492 100644 --- a/etc/paludis/hooks/sync_all_post/sync_herds_xml.bash +++ b/etc/paludis/hooks/sync_all_post/sync_herds_xml.bash @@ -1,17 +1,13 @@ #!/bin/bash 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!" -die() { - eerror "${1}" - exit 1 -} - cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" [[ -e "${PORTDIR}"/metadata/herds.xml ]] && { rm "${PORTDIR}"/metadata/herds.xml || die "failed to rm herds.xml!" ;} wget https://gitweb.gentoo.org/proj/api.git/plain/files/packages/herds.xml || die "failed to wget herds.xml" diff --git a/etc/paludis/hooks/sync_all_post/sync_news.bash b/etc/paludis/hooks/sync_all_post/sync_news.bash index 6433376..f46f8c0 100644 --- a/etc/paludis/hooks/sync_all_post/sync_news.bash +++ b/etc/paludis/hooks/sync_all_post/sync_news.bash @@ -1,17 +1,13 @@ #!/bin/bash +source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" +source "${PALUDIS_EBUILD_DIR}/die_functions.bash" + PORTDIR="/usr/portage" -source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" - [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!" -die() { - eerror "${1}" - exit 1 -} - cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" if [[ -e news ]] ; then einfo "news dir already exists, updating..."