diff options
author | 2015-05-25 15:13:13 +0200 | |
---|---|---|
committer | 2015-05-25 15:13:13 +0200 | |
commit | ddf4c60d7b580790322c8b677490dbbaead15073 (patch) | |
tree | b234bf7495457d9154599cdafe3f5e55dcc00120 | |
parent | eclass/: Update copyright years. (diff) | |
download | emacs-ddf4c60d7b580790322c8b677490dbbaead15073.tar.gz emacs-ddf4c60d7b580790322c8b677490dbbaead15073.tar.bz2 emacs-ddf4c60d7b580790322c8b677490dbbaead15073.zip |
elisp-common.eclass: Fix filename matching in elisp-site-file-install.
* elisp-common.eclass (elisp-site-file-install): Fix filename
matching. It should use shortest match, not longest.
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/elisp-common.eclass | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index cef4072..3cfdab5 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,3 +1,8 @@ +2015-05-25 Ulrich Müller <ulm@gentoo.org> + + * elisp-common.eclass (elisp-site-file-install): Fix filename + matching. It should use shortest match, not longest. + 2014-06-07 Ulrich Müller <ulm@gentoo.org> * elisp.eclass (DEPEND): Increase minimum Emacs version to 23. diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 6f93e92..36ad8ae 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -322,7 +322,8 @@ elisp-site-file-install() { [[ ${sf} == [0-9][0-9]*-gentoo*.el ]] \ || ewarn "elisp-site-file-install: bad name of site-init file" - sf="${T}/${sf/%-gentoo*.el/-gentoo.el}" + [[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el" + sf="${T}/${sf}" ebegin "Installing site initialisation file for GNU Emacs" [[ $1 = "${sf}" ]] || cp "$1" "${sf}" sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \ |