saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
12
paludis/hooks/set_portdir.bash
Normal file
12
paludis/hooks/set_portdir.bash
Normal 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
|
||||
Reference in New Issue
Block a user