aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElfyn McBratney <beu@gentoo.org>2005-06-15 15:24:59 +0000
committerElfyn McBratney <beu@gentoo.org>2005-06-15 15:24:59 +0000
commit801c2c5ffe13185d492049844c62d570fe75cdf1 (patch)
treefe48157afd85866b8b547415187d64b8a209c56d
parentadded uclibctoolize and darwintoolize (diff)
downloadgentoo-syntax-801c2c5ffe13185d492049844c62d570fe75cdf1.tar.gz
gentoo-syntax-801c2c5ffe13185d492049844c62d570fe75cdf1.tar.bz2
gentoo-syntax-801c2c5ffe13185d492049844c62d570fe75cdf1.zip
s/eclectic/eselect/g. New script (rolldist.sh) ot make rolling distribution tarballs easier.
svn path=/trunk/; revision=4
-rw-r--r--Makefile10
-rw-r--r--doc/gentoo-syntax.txt5
-rw-r--r--ftdetect/eselect.vim (renamed from ftdetect/eclectic.vim)10
-rw-r--r--ftplugin/eselect.vim (renamed from ftplugin/eclectic.vim)4
-rw-r--r--indent/eselect.vim (renamed from indent/eclectic.vim)6
-rw-r--r--plugin/neweselect.vim (renamed from plugin/neweclectic.vim)20
-rwxr-xr-xrolldist.sh46
-rw-r--r--syntax/eclectic.vim69
-rw-r--r--syntax/eselect.vim69
9 files changed, 145 insertions, 94 deletions
diff --git a/Makefile b/Makefile
index f88c7e9..1bc6109 100644
--- a/Makefile
+++ b/Makefile
@@ -20,17 +20,17 @@ files_doc = \
files_ftdetect = \
ftdetect/gentoo.vim \
ftplugin/ebuild.vim \
- ftdetect/eclectic.vim
+ ftdetect/eselect.vim
files_ftplugin = \
ftplugin/gentoo-changelog.vim \
ftplugin/gentoo-metadata.vim \
- ftplugin/eclectic.vim
+ ftplugin/eselect.vim
files_indent = \
indent/ebuild.vim \
indent/gentoo-metadata.vim \
- indent/eclectic.vim
+ indent/eselect.vim
files_plugin = \
plugin/bugsummary.vim \
@@ -38,7 +38,7 @@ files_plugin = \
plugin/newebuild.vim \
plugin/newmetadata.vim \
plugin/newinitd.vim \
- plugin/neweclectic.vim
+ plugin/neweselect.vim
files_syntax = \
syntax/ebuild.vim \
@@ -56,7 +56,7 @@ files_syntax = \
syntax/gentoo-use-desc.vim \
syntax/glep.vim \
syntax/guidexml.vim \
- syntax/eclectic.vim
+ syntax/eselect.vim
files = $(foreach f, $(files_vars), $($(f)) )
diff --git a/doc/gentoo-syntax.txt b/doc/gentoo-syntax.txt
index bb9c8b2..60210a8 100644
--- a/doc/gentoo-syntax.txt
+++ b/doc/gentoo-syntax.txt
@@ -267,6 +267,11 @@ Authors: Ciaran McCreesh <ciaranm at gentoo dot org>
==============================================================================
3. ChangeLog *gentoo-syntax-changelog*
+ 20050615 beu
+ * s/eclectic/eselect/g
+ * Use GentooGetUser() function for the local-part of MAINTAINER
+ when creating a boiler-plate eselect module.
+
20050515 beu
* Testing, testing .. Fix a 'few' typo's in syntax/eclectic.vim.
diff --git a/ftdetect/eclectic.vim b/ftdetect/eselect.vim
index d62796b..d9299d7 100644
--- a/ftdetect/eclectic.vim
+++ b/ftdetect/eselect.vim
@@ -1,18 +1,18 @@
" Vim filetype detection file
-" Language: Eclectic Things
+" Language: Eselect Things
" Author: Elfyn McBratney <beu@gentoo.org>
" Copyright: Copyright (c) 2005 Elfyn McBratney
" Licence: You may redistribute this under the same terms as Vim itself
"
-" This sets up syntax highlighting for Eclectic modules.
+" This sets up syntax highlighting for Eselect modules.
"
if &compatible || v:version < 603
finish
endif
-" eclectic modules
-au BufNewFile,BufRead *.eclectic
- \ set filetype=eclectic
+" eselect modules
+au BufNewFile,BufRead *.eselect
+ \ set filetype=eselect
" vim: sw=4 ts=4 et fdm=marker
diff --git a/ftplugin/eclectic.vim b/ftplugin/eselect.vim
index 4193e5b..7c248d2 100644
--- a/ftplugin/eclectic.vim
+++ b/ftplugin/eselect.vim
@@ -1,10 +1,10 @@
" Vim filetype plugin file
-" Language: Eclectic Module (bash)
+" Language: Eselect Module (bash)
" Author: Ciaran McCreesh <ciaranm@gentoo.org>
" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh
" Licence: You may redistribute this under the same terms as Vim itself
"
-" This sets up filetype specific options for ectic modules. These settings
+" This sets up filetype specific options for eselect modules. These settings
" were pwned from ebuild.vim, but they wfm ..
"
diff --git a/indent/eclectic.vim b/indent/eselect.vim
index 3816581..afb78cf 100644
--- a/indent/eclectic.vim
+++ b/indent/eselect.vim
@@ -1,11 +1,11 @@
" Vim syntax file
-" Language: Eclectic Modules
+" Language: Eselect Modules
" Author: Ciaran McCreesh <ciaranm@gentoo.org>
" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh
" Licence: You may redistribute this under the same terms as Vim itself
"
-" Syntax highlighting for Eclectic modules. Inherits from sh.vim and adds
-" in Eclectic-specific highlights for certain keywords and functions. Requires
+" Syntax highlighting for Eselect modules. Inherits from sh.vim and adds
+" in Eselect-specific highlights for certain keywords and functions. Requires
" vim 6.3 or later.
if &compatible || v:version < 603
diff --git a/plugin/neweclectic.vim b/plugin/neweselect.vim
index baacb40..fe87dbd 100644
--- a/plugin/neweclectic.vim
+++ b/plugin/neweselect.vim
@@ -1,5 +1,5 @@
" Vim plugin
-" Purpose: Intelligently create content for new ebuild files
+" Purpose: Intelligently create content for new eselect files
" Author: Ciaran McCreesh <ciaranm@gentoo.org>,
" Elfyn McBratney <beu@gentoo.org>
" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh
@@ -11,7 +11,7 @@ if &compatible || v:version < 603
endif
" nicked from gentoo-common.vim
-fun! EclecticModuleHeader()
+fun! EselectModuleHeader()
let l:year = strftime("%Y")
0 put ='# Copyright 1999-' . l:year . ' Gentoo Foundation'
put ='# Distributed under the terms of the GNU General Public License v2'
@@ -19,15 +19,15 @@ fun! EclecticModuleHeader()
$
endfun
-fun! <SID>MakeNewEclecticModule()
+fun! <SID>MakeNewEselectModule()
let l:pastebackup = &paste
set nopaste
- call EclecticModuleHeader()
+ call EselectModuleHeader()
- " {{{ boiler-plate eclectic module
+ " {{{ boiler-plate eselect module
put ='DESCRIPTION=\"\"'
- put ='MAINTAINER=\"you@gentoo.org\"'
+ put ='MAINTAINER=\"' . GentooGetUser() . '@gentoo.org\"'
put =''
call setline(line("."), 'SVN_DATE=' . "'" . '$Date: $' . "'")
put ='VERSION=$(svn_date_to_version \"${SVN_DATE}\" )'
@@ -60,12 +60,12 @@ fun! <SID>MakeNewEclecticModule()
endif
endfun
-com! -nargs=0 MakeNewEclecticModule call <SID>MakeNewEclecticModule()
+com! -nargs=0 MakeNewEselectModule call <SID>MakeNewEselectModule()
-augroup MakeNewEclecticModule
+augroup MakeNewEselectModule
au!
- autocmd BufNewFile *.eclectic
- \ call <SID>MakeNewEclecticModule()
+ autocmd BufNewFile *.eselect
+ \ call <SID>MakeNewEselectModule()
augroup end
" vim: sw=4 ts=4 et fdm=marker
diff --git a/rolldist.sh b/rolldist.sh
new file mode 100755
index 0000000..5d7def9
--- /dev/null
+++ b/rolldist.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+prog="${foo/*\/}"
+die() { echo >&2 "${prog}: error: $@"; exit 1; }
+
+if [[ $# < 2 ]]; then
+ echo "usage: ${prog} [source-dir] [new-version]"
+ exit 0
+fi
+
+[[ -d $1 ]] || die "directory '$1' does not exist, or is not a directory"
+srcdir="`realpath $1`" || die "realpath failed"
+relver="$2"
+
+tmpdir=`mktemp -d /tmp/.gentoo-syntax-release.XXXXXXXXXX`
+if [ $? -ne 0 ]; then
+ [[ ${tmpdir} != x ]] && rm -f ${tmpdir} 2>/dev/null
+ die "mktemp failed"
+fi
+
+trap 'rm -rf ${tmpdir}' 1 2 3 6 9 15
+oldwd="`pwd`"
+tmpreldir="${tmpdir}/gentoo-syntax-${relver}"
+cd "${tmpdir}" || die "cd '${tmpdir}' failed"
+mkdir -p "${tmpreldir}"
+
+if type -p rsync &>/dev/null; then
+ rsync \
+ -aqc --exclude=CVS --exclude=.svn \
+ "${srcdir}/" "${tmpreldir}" || die "rsync failed"
+else
+ cp -a "${srcdir}"/* "${srcdir}"/.[a-z0-9]* \
+ "${tmpreldir}" || die "cp failed"
+ find "${tmpreldir}" \
+ \( -name .svn -or -name CVS \) -print \
+ |xargs --no-run-if-empty rm -r \
+ || die "find '${tmpreldir}' failed"
+fi
+
+tar -jcpf gentoo-syntax-${relver}{.tar.bz2,/} || die "tar failed"
+mv -f gentoo-syntax-${relver}.tar.bz2 "${oldwd}" || dir "mv failed"
+rm -rf ${tmpdir}
+
+echo "gentoo-syntax-${relver}.tar.bz2 rolled and ready .. ;)"
+
+# vim: ts=4 sw=4 noet
diff --git a/syntax/eclectic.vim b/syntax/eclectic.vim
deleted file mode 100644
index 2ef0e37..0000000
--- a/syntax/eclectic.vim
+++ /dev/null
@@ -1,69 +0,0 @@
-" Vim syntax file
-" Language: Gentoo Ebuilds/Eclasses
-" Author: Ciaran McCreesh <ciaranm@gentoo.org>,
-" Elfyn McBratney <beu@gentoo.org>
-" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh,
-" Copyright (c) 2005 Elfyn McBratney
-" Licence: You may redistribute this under the same terms as Vim itself
-"
-" Syntax highlighting for ebuilds and eclasses. Inherits from sh.vim and adds
-" in Gentoo-specific highlights for certain keywords and functions. Requires
-" vim 6.3 or later.
-"
-
-if &compatible || v:version < 603
- finish
-endif
-
-if exists("b:current_syntax")
- finish
-endif
-
-let is_bash=1
-runtime! syntax/sh.vim
-unlet b:current_syntax
-
-"runtime syntax/gentoo-common.vim
-
-" function names can contain more characters than sh.vim allows. Override
-" this. See Gentoo bug 72469.
-syn match bkshFunction "^\s*\<\h[0-9a-zA-Z_\-\.]*\>\s*()" skipwhite skipnl contains=bkshFunctionParen
-
-" Core keywords
-syn keyword EclecticCoreKeyword die is_function has
-
-" Config keywords
-syn keyword EclecticConfigKeyword store_config load_config add_config
-
-" (String/misc) manipulation keywords
-syn keyword EclecticManipKeyword svn_date_to_version
-
-" Multilib keywords
-syn keyword EclecticMultilibKeyword list_libdirs
-
-" Output keywords
-syn keyword EclecticOutputKeywords write_error_msg write_list_start
-syn keyword EclecticOutputKeywords write_kv_list_entry write_numbered_list_entry
-syn keyword EclecticOutputKeywords write_numbered_list highlight
-syn keyword EclecticOutputKeywords highlight_warning space
-
-" Test keywords
-syn keyword EclecticTestKeywords is_number
-
-" clusters
-syn cluster EclecticThings contains=EclecticCoreKeyword,EclecticConfigKeyword
-syn cluster EclecticThings add=EclecticManipKeyword,EclecticMultilibKeyword,
-syn cluster EclecticThings add=EclecticOutputKeywords,EclecticTestKeywords
-
-syn cluster shCommandSubList add=@EclecticThings
-
-hi def link EclecticCoreKeyword Keyword
-hi def link EclecticConfigKeyword Identifier
-hi def link EclecticManipKeyword Identifier
-hi def link EclecticMultilibKeyword Identifier
-hi def link EclecticOutputKeyword Identifier
-hi def link EclecticTestKeyword Identifier
-
-let b:current_syntax = "eclectic"
-
-" vim: sw=4 ts=4 et fdm=marker
diff --git a/syntax/eselect.vim b/syntax/eselect.vim
new file mode 100644
index 0000000..26ae05d
--- /dev/null
+++ b/syntax/eselect.vim
@@ -0,0 +1,69 @@
+" Vim syntax file
+" Language: Gentoo Eselect modules/libs
+" Author: Ciaran McCreesh <ciaranm@gentoo.org>,
+" Elfyn McBratney <beu@gentoo.org>
+" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh,
+" Copyright (c) 2005 Elfyn McBratney
+" Licence: You may redistribute this under the same terms as Vim itself
+"
+" Syntax highlighting for ebuilds and eclasses. Inherits from sh.vim and adds
+" in Gentoo-specific highlights for certain keywords and functions. Requires
+" vim 6.3 or later.
+"
+
+if &compatible || v:version < 603
+ finish
+endif
+
+if exists("b:current_syntax")
+ finish
+endif
+
+let is_bash=1
+runtime! syntax/sh.vim
+unlet b:current_syntax
+
+"runtime syntax/gentoo-common.vim
+
+" function names can contain more characters than sh.vim allows. Override
+" this. See Gentoo bug 72469.
+syn match bkshFunction "^\s*\<\h[0-9a-zA-Z_\-\.]*\>\s*()" skipwhite skipnl contains=bkshFunctionParen
+
+" Core keywords
+syn keyword EselectCoreKeyword die is_function has
+
+" Config keywords
+syn keyword EselectConfigKeyword store_config load_config add_config
+
+" (String/misc) manipulation keywords
+syn keyword EselectManipKeyword svn_date_to_version
+
+" Multilib keywords
+syn keyword EselectMultilibKeyword list_libdirs
+
+" Output keywords
+syn keyword EselectOutputKeywords write_error_msg write_list_start
+syn keyword EselectOutputKeywords write_kv_list_entry write_numbered_list_entry
+syn keyword EselectOutputKeywords write_numbered_list highlight
+syn keyword EselectOutputKeywords highlight_warning space
+
+" Test keywords
+syn keyword EselectTestKeywords is_number
+
+" clusters
+syn cluster EselectThings contains=EselectCoreKeyword,EselectConfigKeyword
+syn cluster EselectThings add=EselectManipKeyword,EselectMultilibKeyword,
+syn cluster EselectThings add=EselectOutputKeywords,EselectTestKeywords
+
+syn cluster shCommandSubList add=@EselectThings
+
+hi def link EselectCoreKeyword Keyword
+hi def link EselectConfigKeyword Identifier
+hi def link EselectManipKeyword Identifier
+hi def link EselectMultilibKeyword Identifier
+hi def link EselectOutputKeyword Identifier
+hi def link EselectTestKeyword Identifier
+
+let b:current_syntax = "eselect"
+
+" vim: sw=4 ts=4 et fdm=marker