saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
2015-08-14 21:35:32 +02:00
committed by Hans Wurst
parent 12a483fe36
commit 2dedf3a185
6 changed files with 23 additions and 21 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# set PORTDIR
PORTDIR="$(cave print-repository-metadata --raw-name location gentoo)"
PORTDIR="${PORTDIR#location=}"
if [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] ; then
die "PORTDIR empty or pointing to root!"
elif [[ ! -e ${PORTDIR} ]] ; then
die "${PORTDIR} does not exist!"
fi