From 12a483fe368cd69d91540e485e0af5d1c7144a6e Mon Sep 17 00:00:00 2001 From: hasufell Date: Fri, 14 Aug 2015 16:41:35 +0200 Subject: [PATCH] saving uncommitted changes in /etc prior to emerge run --- paludis/hooks/sync_all_post/sync_cache.bash | 6 +----- paludis/hooks/sync_all_post/sync_dtd.bash | 6 +----- paludis/hooks/sync_all_post/sync_glsa.bash | 6 +----- paludis/hooks/sync_all_post/sync_herds_xml.bash | 6 +----- paludis/hooks/sync_all_post/sync_news.bash | 10 +++------- 5 files changed, 7 insertions(+), 27 deletions(-) diff --git a/paludis/hooks/sync_all_post/sync_cache.bash b/paludis/hooks/sync_all_post/sync_cache.bash index c40261e..6cc1655 100644 --- a/paludis/hooks/sync_all_post/sync_cache.bash +++ b/paludis/hooks/sync_all_post/sync_cache.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 -} - einfo "syncing metadata cache" for i in gentoo games-overlay desktop-overlay media-overlay prism-overlay libressl arx-libertatis dotnet haskell qt sage-on-gentoo torbrowser tox-overlay hasufell-overlay; do diff --git a/paludis/hooks/sync_all_post/sync_dtd.bash b/paludis/hooks/sync_all_post/sync_dtd.bash index 2a1b357..55b0867 100644 --- a/paludis/hooks/sync_all_post/sync_dtd.bash +++ b/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/paludis/hooks/sync_all_post/sync_glsa.bash b/paludis/hooks/sync_all_post/sync_glsa.bash index 684e538..49b4961 100644 --- a/paludis/hooks/sync_all_post/sync_glsa.bash +++ b/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/paludis/hooks/sync_all_post/sync_herds_xml.bash b/paludis/hooks/sync_all_post/sync_herds_xml.bash index 85ba769..f6b5492 100644 --- a/paludis/hooks/sync_all_post/sync_herds_xml.bash +++ b/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/paludis/hooks/sync_all_post/sync_news.bash b/paludis/hooks/sync_all_post/sync_news.bash index 6433376..f46f8c0 100644 --- a/paludis/hooks/sync_all_post/sync_news.bash +++ b/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..."