saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
24
paludis/hooks/sync_all_post/sync_dtd.bash
Normal file
24
paludis/hooks/sync_all_post/sync_dtd.bash
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/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'!"
|
||||
if [[ -e dtd ]] ; then
|
||||
einfo "dtd dir already exists, updating..."
|
||||
cd glsa || die "could not cd into 'dtd'!"
|
||||
git pull --ff || die "could not pull updates!"
|
||||
else
|
||||
einfo "dtd directory does not exist, cloning..."
|
||||
git clone https://anongit.gentoo.org/git/data/dtd.git || die "could not clone repository!"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user