saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
2015-08-14 15:46:59 +02:00
committed by Hans Wurst
parent 7bcc2875ff
commit 9481ae9bb5
7 changed files with 117 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/bash
source "${PALUDIS_EBUILD_DIR}/echo_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"