help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: emacs-style variables (etc) in the headers?


From: Mike
Subject: Re: OT: emacs-style variables (etc) in the headers?
Date: Mon, 27 Dec 2004 18:17:50 GMT
User-agent: slrn/0.9.7.4 (Linux)

In article <mailman.9151.1104169993.27204.help-gnu-emacs@gnu.org>, Peter 
Dyballa wrote:
> 
> Am 27.12.2004 um 17:59 schrieb Mike:
> 
>> Is there an algorithm somewhere to detect the script
>> is really a script and not a binary file, what the comment
>> character is, and some standard way to include these variables
>> and such in files?
> 
> Yes: RTFMs.
> 
> The UNIX file command can test what kind of file it is. It might be 
> useful to extend file's magic file by some extra entries. The standard 
> way to include these variables should be GNU Emacs.
> 
> (What about a side project that documents what you've discovered?)
> 

Below are the comments at the start of the program I'm working on.
I currently have 20+ boxes with 20+ different configurations. The
program I've started is intended to run on each server and maintain
a consistent configuration.

Mike

#!/usr/bin/perl

# $Id$
# $Log$

# maintain a consistent configuration on the local server

# see if cvs is installed
# check that ~/.cvspass and ~/.cvsrc exist
# load the config file
# see if the $cfgdir exists (else mkdir $cvsdir, then cvs co -d $cfgdir unixcfg)
# execute chdir $cfgdir ; cvs update
# log the output of the cvs update
# examine all files in $cfgdir
# if file in $cfgdir/$file is newer than /$file
#   extract any code snippets from the header of $cfgdir/$file
#   execute any pre-snippets
#   install the file
#   execute any post-snippets
#   update the log with the output of the snippets
#   loop

# if asked, use the pod formatting on the files
# determine the difference between documentation, snippets, and the rest of the 
file
# (should this be a separate script?)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]