/[gentoo-x86]/eclass/savedconfig.eclass
Gentoo

Diff of /eclass/savedconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.18 Revision 1.19
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.18 2012/01/04 06:22:12 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.19 2012/01/04 07:45:16 vapier Exp $
4 4
5# @ECLASS: savedconfig.eclass 5# @ECLASS: savedconfig.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: common API for saving/restoring complex configuration files 8# @BLURB: common API for saving/restoring complex configuration files
30 die "Bad package! save_config only for use in src_install functions!" 30 die "Bad package! save_config only for use in src_install functions!"
31 fi 31 fi
32 [[ $# -eq 0 ]] && die "Usage: save_config <files>" 32 [[ $# -eq 0 ]] && die "Usage: save_config <files>"
33 33
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="/etc/portage/savedconfig/${CATEGORY}"
38 if [[ $# -eq 1 && -f $1 ]] ; then 38 if [[ $# -eq 1 && -f $1 ]] ; then
39 # Just one file, so have the ${PF} be that config file 39 # Just one file, so have the ${PF} be that config file
40 dodir "${dest}" 40 dodir "${dest}"

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20