/[gentoo-x86]/eclass/elisp-common.eclass
Gentoo

Diff of /eclass/elisp-common.eclass

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

Revision 1.74 Revision 1.75
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/elisp-common.eclass,v 1.74 2011/08/22 06:56:26 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.75 2011/08/30 20:10:13 ulm Exp $
4# 4#
5# @ECLASS: elisp-common.eclass 5# @ECLASS: elisp-common.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo Emacs team <emacs@gentoo.org> 7# Gentoo Emacs team <emacs@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
315elisp-site-regen() { 315elisp-site-regen() {
316 local sitelisp=${ROOT}${EPREFIX}${SITELISP} 316 local sitelisp=${ROOT}${EPREFIX}${SITELISP}
317 local sf i line null="" page=$'\f' 317 local sf i line null="" page=$'\f'
318 local -a sflist 318 local -a sflist
319 319
320 if [ ! -d "${sitelisp}" ]; then 320 if [[ ! -d ${sitelisp} ]]; then
321 eerror "elisp-site-regen: Directory ${sitelisp} does not exist" 321 eerror "elisp-site-regen: Directory ${sitelisp} does not exist"
322 return 1 322 return 1
323 fi 323 fi
324 324
325 if [ ! -d "${T}" ]; then 325 if [[ ! -d ${T} ]]; then
326 eerror "elisp-site-regen: Temporary directory ${T} does not exist" 326 eerror "elisp-site-regen: Temporary directory ${T} does not exist"
327 return 1 327 return 1
328 fi 328 fi
329 329
330 einfon "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE}) ..." 330 einfon "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE}) ..."
334 rm -f "${sitelisp}"/00site-gentoo.el 334 rm -f "${sitelisp}"/00site-gentoo.el
335 335
336 for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \ 336 for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \
337 "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el 337 "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el
338 do 338 do
339 [ -r "${sf}" ] || continue 339 [[ -r ${sf} ]] || continue
340 # sort files by their basename. straight insertion sort. 340 # sort files by their basename. straight insertion sort.
341 for ((i=${#sflist[@]}; i>0; i--)); do 341 for ((i=${#sflist[@]}; i>0; i--)); do
342 [[ ${sf##*/} < ${sflist[i-1]##*/} ]] || break 342 [[ ${sf##*/} < ${sflist[i-1]##*/} ]] || break
343 sflist[i]=${sflist[i-1]} 343 sflist[i]=${sflist[i-1]}
344 done 344 done

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75

  ViewVC Help
Powered by ViewVC 1.1.20