Use die_functions.bash provided by paludis
This commit is contained in:
parent
e7d5d9aa70
commit
954b98f4e0
@ -1,16 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
||||||
|
|
||||||
PORTDIR="/usr/portage"
|
PORTDIR="/usr/portage"
|
||||||
|
|
||||||
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
|
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
|
||||||
|
|
||||||
|
|
||||||
die() {
|
|
||||||
eerror "${1}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo "syncing metadata cache"
|
einfo "syncing metadata cache"
|
||||||
egencache --jobs=8 --repo=gentoo --update --update-use-local-desc || die "egencache failed!"
|
egencache --jobs=8 --repo=gentoo --update --update-use-local-desc || die "egencache failed!"
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
||||||
|
|
||||||
PORTDIR="/usr/portage"
|
PORTDIR="/usr/portage"
|
||||||
|
|
||||||
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
|
[[ -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'!"
|
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||||
if [[ -e dtd ]] ; then
|
if [[ -e dtd ]] ; then
|
||||||
einfo "dtd dir already exists, updating..."
|
einfo "dtd dir already exists, updating..."
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
||||||
|
|
||||||
PORTDIR="/usr/portage"
|
PORTDIR="/usr/portage"
|
||||||
|
|
||||||
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
|
[[ -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'!"
|
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||||
if [[ -e glsa ]] ; then
|
if [[ -e glsa ]] ; then
|
||||||
einfo "glsa dir already exists, updating..."
|
einfo "glsa dir already exists, updating..."
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
||||||
|
|
||||||
PORTDIR="/usr/portage"
|
PORTDIR="/usr/portage"
|
||||||
|
|
||||||
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
|
[[ -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'!"
|
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!" ;}
|
[[ -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"
|
wget https://gitweb.gentoo.org/proj/api.git/plain/files/packages/herds.xml || die "failed to wget herds.xml"
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
||||||
|
|
||||||
PORTDIR="/usr/portage"
|
PORTDIR="/usr/portage"
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|
||||||
|
|
||||||
[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!"
|
[[ -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'!"
|
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||||
if [[ -e news ]] ; then
|
if [[ -e news ]] ; then
|
||||||
einfo "news dir already exists, updating..."
|
einfo "news dir already exists, updating..."
|
||||||
|
Loading…
Reference in New Issue
Block a user