Lines 34-53
Link Here
|
34 |
# Be lazy in our EAPI compat |
34 |
# Be lazy in our EAPI compat |
35 |
: ${ED:=${D}} |
35 |
: ${ED:=${D}} |
36 |
|
36 |
|
37 |
local dest="/etc/portage/savedconfig/${CATEGORY}" |
37 |
local dest="${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}" |
|
|
38 |
addwrite ${dest} |
38 |
if [[ $# -eq 1 && -f $1 ]] ; then |
39 |
if [[ $# -eq 1 && -f $1 ]] ; then |
39 |
# Just one file, so have the ${PF} be that config file |
40 |
# Just one file, so have the ${PF} be that config file |
40 |
dodir "${dest}" |
41 |
mkdir -p "${dest}" |
41 |
cp "$@" "${ED}/${dest}/${PF}" || die "failed to save $*" |
42 |
cp "$@" "${dest}/${PF}" || die "failed to save $*" |
42 |
else |
43 |
else |
43 |
# A dir, or multiple files, so have the ${PF} be a dir |
44 |
# A dir, or multiple files, so have the ${PF} be a dir |
44 |
# with all the saved stuff below it |
45 |
# with all the saved stuff below it |
45 |
dodir "${dest}/${PF}" |
46 |
mkdir -p "${dest}/${PF}" |
46 |
treecopy "$@" "${ED}/${dest}/${PF}" || die "failed to save $*" |
47 |
treecopy "$@" "${dest}/${PF}" || die "failed to save $*" |
47 |
fi |
48 |
fi |
48 |
|
49 |
|
49 |
elog "Your configuration for ${CATEGORY}/${PF} has been saved in " |
50 |
elog "Your configuration for ${CATEGORY}/${PF} has been saved in " |
50 |
elog "/etc/portage/savedconfig/${CATEGORY}/${PF} for your editing pleasure." |
51 |
elog "${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PF} for your editing pleasure." |
51 |
elog "You can edit these files by hand and remerge this package with" |
52 |
elog "You can edit these files by hand and remerge this package with" |
52 |
elog "USE=savedconfig to customise the configuration." |
53 |
elog "USE=savedconfig to customise the configuration." |
53 |
elog "You can rename this file/directory to one of the following for" |
54 |
elog "You can rename this file/directory to one of the following for" |